[850b344] | 1 | package com.project.beautycenter.model;
|
---|
| 2 |
|
---|
| 3 | import javax.persistence.*;
|
---|
| 4 | import java.util.ArrayList;
|
---|
| 5 | import java.util.LinkedHashSet;
|
---|
| 6 | import java.util.List;
|
---|
| 7 | import java.util.Set;
|
---|
| 8 |
|
---|
| 9 | @Entity
|
---|
| 10 | @Table(name = "rezervacija",schema = "project")
|
---|
| 11 | public 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 | } |
---|