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
RevLine 
[3d3e59d]1package finki.paw5.model.entities;
[d427a07]2
[038c9f7]3import jakarta.persistence.*;
[d427a07]4import lombok.Data;
[fdd7961]5import lombok.RequiredArgsConstructor;
[d427a07]6
[fdfc6fa]7import java.time.LocalDate;
[d427a07]8import java.util.Date;
9
10@Data
11@Entity
[fdd7961]12@RequiredArgsConstructor
[d427a07]13@Table(name = "therapy")
14public 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.