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