Last change
on this file since e96d444 was e5fefbd, checked in by Anita Terziska <63020646+Nit4e@…>, 2 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | package com.example.medweb.model;
|
---|
2 |
|
---|
3 | import lombok.Data;
|
---|
4 |
|
---|
5 | import javax.persistence.*;
|
---|
6 | import java.time.ZonedDateTime;
|
---|
7 |
|
---|
8 |
|
---|
9 | @Data
|
---|
10 | @Entity
|
---|
11 | public class Recepta {
|
---|
12 |
|
---|
13 | @Id
|
---|
14 | @GeneratedValue (strategy = GenerationType.IDENTITY)
|
---|
15 | private Integer recepta_id;
|
---|
16 | private ZonedDateTime datum_izdavanje;
|
---|
17 | private ZonedDateTime datum_vaznost;
|
---|
18 | private ZonedDateTime datum_kupuvanje;
|
---|
19 |
|
---|
20 | @ManyToOne
|
---|
21 | @JoinColumn(name = "doktor_id", referencedColumnName = "covek_id", nullable = false)
|
---|
22 | Doktor doktor;
|
---|
23 |
|
---|
24 | @ManyToOne
|
---|
25 | @JoinColumn(name = "covek_pacient_id", referencedColumnName = "covek_id", nullable = false)
|
---|
26 | private Pacient pacient;
|
---|
27 |
|
---|
28 | @ManyToOne
|
---|
29 | @JoinColumn(name = "lek_id", referencedColumnName = "lek_id", nullable = false)
|
---|
30 | Lekovi lek;
|
---|
31 |
|
---|
32 | @ManyToOne
|
---|
33 | @JoinColumn(name = "pregled_id", referencedColumnName = "pregled_id", nullable = true)
|
---|
34 | private Pregled pregled;
|
---|
35 |
|
---|
36 |
|
---|
37 | public Recepta() {
|
---|
38 | }
|
---|
39 |
|
---|
40 | public Recepta(ZonedDateTime datum_izdavanje, ZonedDateTime datum_vaznost, ZonedDateTime datum_kupuvanje) {
|
---|
41 | this.datum_izdavanje = datum_izdavanje;
|
---|
42 | this.datum_vaznost = datum_vaznost;
|
---|
43 | this.datum_kupuvanje = datum_kupuvanje;
|
---|
44 | }
|
---|
45 | } |
---|
Note:
See
TracBrowser
for help on using the repository browser.