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 | |
---|
1 | package com.example.medweb.model;
|
---|
2 |
|
---|
3 |
|
---|
4 | import lombok.Data;
|
---|
5 | import org.hibernate.annotations.*;
|
---|
6 |
|
---|
7 |
|
---|
8 | import javax.persistence.*;
|
---|
9 | import javax.persistence.Entity;
|
---|
10 | import java.io.Serializable;
|
---|
11 | import java.util.List;
|
---|
12 |
|
---|
13 |
|
---|
14 | @Data
|
---|
15 | @Entity
|
---|
16 | @PrimaryKeyJoinColumn(name = "covek_pacient_id")
|
---|
17 | public 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.