main
Last change
on this file since d1fe9c2 was d1fe9c2, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 16 months ago |
required args constructor
|
-
Property mode
set to
100644
|
File size:
1019 bytes
|
Rev | Line | |
---|
[d427a07] | 1 | package finki.paw5.model.relations;
|
---|
| 2 |
|
---|
[4846b7a] | 3 | import jakarta.persistence.*;
|
---|
[d427a07] | 4 | import lombok.Data;
|
---|
[d1fe9c2] | 5 | import lombok.RequiredArgsConstructor;
|
---|
[d427a07] | 6 |
|
---|
[fdfc6fa] | 7 | import java.time.LocalDate;
|
---|
[d427a07] | 8 | import java.util.Date;
|
---|
| 9 |
|
---|
| 10 | @Data
|
---|
| 11 | @Entity
|
---|
[d1fe9c2] | 12 | @RequiredArgsConstructor
|
---|
[d427a07] | 13 | @Table(name = "pet_needs_intervention_in_vet_clinic")
|
---|
[4846b7a] | 14 | @IdClass(PetNeedsInterventionInVetClinicId.class)
|
---|
[d427a07] | 15 | public class PetNeedsInterventionInVetClinic {
|
---|
| 16 |
|
---|
| 17 | @Id
|
---|
| 18 | @Column(name = "id_pet", nullable = false)
|
---|
[ada7108] | 19 | private Integer petId;
|
---|
[d427a07] | 20 |
|
---|
| 21 | @Id
|
---|
| 22 | @Column(name = "id_vet_clinic", nullable = false)
|
---|
[ada7108] | 23 | private Integer vetClinicId;
|
---|
[d427a07] | 24 |
|
---|
| 25 | @Column(name = "date_of_interventing", nullable = false)
|
---|
[fdfc6fa] | 26 | private LocalDate interventionDate;
|
---|
[d427a07] | 27 |
|
---|
| 28 | @Column(name = "description", length = 100)
|
---|
| 29 | private String description;
|
---|
| 30 |
|
---|
[fdfc6fa] | 31 | public PetNeedsInterventionInVetClinic(int petId, int vetClinicId, LocalDate interventionDate, String description) {
|
---|
[d427a07] | 32 | this.petId = petId;
|
---|
| 33 | this.vetClinicId = vetClinicId;
|
---|
| 34 | this.interventionDate = interventionDate;
|
---|
| 35 | this.description = description;
|
---|
| 36 | }
|
---|
| 37 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.