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