source: src/main/java/com/project/beautycenter/model/Rezervacija.java@ 850b344

Last change on this file since 850b344 was 850b344, checked in by Tamara Simikj <tamara.simic12@…>, 2 years ago

Initial commit

  • Property mode set to 100644
File size: 1.9 KB
Line 
1package com.project.beautycenter.model;
2
3import javax.persistence.*;
4import java.util.ArrayList;
5import java.util.LinkedHashSet;
6import java.util.List;
7import java.util.Set;
8
9@Entity
10@Table(name = "rezervacija",schema = "project")
11public class Rezervacija {
12 @Id
13 @GeneratedValue(strategy = GenerationType.IDENTITY)
14 @Column(name = "br_rez", nullable = false)
15 private Integer id;
16
17 @ManyToOne(fetch = FetchType.LAZY, optional = false)
18 @JoinColumn(name = "user_id_klient", nullable = false)
19 private Klienti klienti;
20
21 @ManyToOne(fetch = FetchType.LAZY, optional = false)
22 @JoinColumn(name = "termin_id", nullable = false)
23 private Termini termini;
24
25 @ManyToOne(fetch = FetchType.LAZY)
26 @JoinColumn(name = "uplata_id")
27 private Uplata uplata;
28
29 @ManyToOne(fetch = FetchType.LAZY)
30 @JoinColumn(name = "user_id_vraboten")
31 private Vraboteni vraboteni;
32
33 public Vraboteni getVraboteni() {
34 return vraboteni;
35 }
36
37 public void setVraboteni(Vraboteni vraboteni) {
38 this.vraboteni = vraboteni;
39 }
40
41 public Rezervacija(){
42 }
43
44 public Rezervacija(Klienti klienti, Termini termini, Uplata uplata) {
45 this.klienti = klienti;
46 this.termini = termini;
47 this.uplata = uplata;
48 }
49
50
51 public Rezervacija(Klienti klient, Termini termin) {
52 this.klienti = klienti;
53 this.termini = termini;
54 }
55
56 public Uplata getUplata() {
57 return uplata;
58 }
59
60 public void setUplata(Uplata uplata) {
61 this.uplata = uplata;
62 }
63
64 public Termini getTermini() {
65 return termini;
66 }
67
68 public void setTermini(Termini termini) {
69 this.termini = termini;
70 }
71
72 public Klienti getKlienti() {
73 return klienti;
74 }
75
76 public void setKlienti(Klienti klienti) {
77 this.klienti = klienti;
78 }
79
80 public Integer getId() {
81 return id;
82 }
83
84 public void setId(Integer id) {
85 this.id = id;
86 }
87}
Note: See TracBrowser for help on using the repository browser.