package com.project.beautycenter.model; import javax.persistence.*; import java.util.ArrayList; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @Entity @Table(name = "rezervacija",schema = "project") public class Rezervacija { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "br_rez", nullable = false) private Integer id; @ManyToOne(fetch = FetchType.LAZY, optional = false) @JoinColumn(name = "user_id_klient", nullable = false) private Klienti klienti; @ManyToOne(fetch = FetchType.LAZY, optional = false) @JoinColumn(name = "termin_id", nullable = false) private Termini termini; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "uplata_id") private Uplata uplata; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "user_id_vraboten") private Vraboteni vraboteni; public Vraboteni getVraboteni() { return vraboteni; } public void setVraboteni(Vraboteni vraboteni) { this.vraboteni = vraboteni; } public Rezervacija(){ } public Rezervacija(Klienti klienti, Termini termini, Uplata uplata) { this.klienti = klienti; this.termini = termini; this.uplata = uplata; } public Rezervacija(Klienti klient, Termini termin) { this.klienti = klienti; this.termini = termini; } public Uplata getUplata() { return uplata; } public void setUplata(Uplata uplata) { this.uplata = uplata; } public Termini getTermini() { return termini; } public void setTermini(Termini termini) { this.termini = termini; } public Klienti getKlienti() { return klienti; } public void setKlienti(Klienti klienti) { this.klienti = klienti; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } }