source: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Therapy.java@ d1fe9c2

main
Last change on this file since d1fe9c2 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 
1package finki.paw5.model.entities;
2
3import jakarta.persistence.*;
4import lombok.Data;
5import lombok.RequiredArgsConstructor;
6
7import java.time.LocalDate;
8import java.util.Date;
9
10@Data
11@Entity
12@RequiredArgsConstructor
13@Table(name = "therapy")
14public 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.