source: src/main/java/com/example/medweb/model/Pacient.java

Last change on this file was e5fefbd, checked in by Anita Terziska <63020646+Nit4e@…>, 2 years ago

initial commit

  • Property mode set to 100644
File size: 944 bytes
Line 
1package com.example.medweb.model;
2
3
4import lombok.Data;
5import org.hibernate.annotations.*;
6
7
8import javax.persistence.*;
9import javax.persistence.Entity;
10import java.io.Serializable;
11import java.util.List;
12
13
14@Data
15@Entity
16@PrimaryKeyJoinColumn(name = "covek_pacient_id")
17public class Pacient extends Covek implements Serializable {
18
19 @Column(nullable = true)
20 private Integer pacient_id;
21
22 @OneToMany(mappedBy = "pacient", fetch = FetchType.EAGER)
23 @Fetch(value = FetchMode.SUBSELECT)
24 private List<Upat> upatList;
25
26 public Pacient() {
27 }
28
29 public Pacient(String email, String pass, String embg, String ime, String prezime, Integer pacient_id,
30 List<Upat> upatList) {
31 super(email, pass, embg, ime, prezime);
32 this.pacient_id = pacient_id;
33 this.upatList = upatList;
34 }
35
36 public Pacient(String ime, String prezime, String embg, String email, String encryptPass) {
37
38 }
39
40}
Note: See TracBrowser for help on using the repository browser.