main
|
Last change
on this file was 700e2f9, checked in by 186079 <matej.milevski@…>, 5 days ago |
|
Init
|
-
Property mode
set to
100644
|
|
File size:
776 bytes
|
| Line | |
|---|
| 1 | package com.finki.icare.model;
|
|---|
| 2 |
|
|---|
| 3 | import jakarta.persistence.*;
|
|---|
| 4 | import lombok.AllArgsConstructor;
|
|---|
| 5 | import lombok.Data;
|
|---|
| 6 | import lombok.NoArgsConstructor;
|
|---|
| 7 |
|
|---|
| 8 | import java.time.LocalDate;
|
|---|
| 9 |
|
|---|
| 10 | @Entity
|
|---|
| 11 | @Table(name = "therapy")
|
|---|
| 12 | @Data
|
|---|
| 13 | @NoArgsConstructor
|
|---|
| 14 | @AllArgsConstructor
|
|---|
| 15 | public class Therapy {
|
|---|
| 16 |
|
|---|
| 17 | @Id
|
|---|
| 18 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
|---|
| 19 | @Column(name = "id_therapy")
|
|---|
| 20 | private Integer idTherapy;
|
|---|
| 21 |
|
|---|
| 22 | @Column(name = "name", nullable = false, length = 100)
|
|---|
| 23 | private String name;
|
|---|
| 24 |
|
|---|
| 25 | @Column(name = "dose", nullable = false, length = 50)
|
|---|
| 26 | private String dose;
|
|---|
| 27 |
|
|---|
| 28 | @Column(name = "exp_date", nullable = false)
|
|---|
| 29 | private LocalDate expDate;
|
|---|
| 30 |
|
|---|
| 31 | @ManyToOne
|
|---|
| 32 | @JoinColumn(name = "id_consultation", nullable = false)
|
|---|
| 33 | private Consultation consultation;
|
|---|
| 34 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.