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