main
Last change
on this file since fdd7961 was fdd7961, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 16 months ago |
fix many to one relations
|
-
Property mode
set to
100644
|
File size:
825 bytes
|
Line | |
---|
1 | package finki.paw5.model.entities;
|
---|
2 |
|
---|
3 | import jakarta.persistence.*;
|
---|
4 | import lombok.Data;
|
---|
5 | import lombok.RequiredArgsConstructor;
|
---|
6 |
|
---|
7 | import java.time.LocalDate;
|
---|
8 | import java.util.Date;
|
---|
9 |
|
---|
10 | @Data
|
---|
11 | @Entity
|
---|
12 | @RequiredArgsConstructor
|
---|
13 | @Table(name = "therapy")
|
---|
14 | public class Therapy {
|
---|
15 |
|
---|
16 | @Id
|
---|
17 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
18 | @Column(name = "id_therapy")
|
---|
19 | private Integer id;
|
---|
20 |
|
---|
21 | @Column(name = "health_problem", nullable = false, length = 100)
|
---|
22 | private String healthProblem;
|
---|
23 |
|
---|
24 | @Column(name = "start_date")
|
---|
25 | private LocalDate startDate;
|
---|
26 |
|
---|
27 | @Column(name = "end_date")
|
---|
28 | private LocalDate endDate;
|
---|
29 |
|
---|
30 | public Therapy(String healthProblem, LocalDate startDate, LocalDate endDate) {
|
---|
31 | this.healthProblem = healthProblem;
|
---|
32 | this.startDate = startDate;
|
---|
33 | this.endDate = endDate;
|
---|
34 | }
|
---|
35 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.