main
Last change
on this file since 3d3e59d was fdfc6fa, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 17 months ago |
change to LocalDate
Date (Java) was incompatible with date (postgresql) because it expected a timestamp type, not date
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | package finki.paw5.model.relations;
|
---|
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.time.LocalDate;
|
---|
10 | import java.util.Date;
|
---|
11 |
|
---|
12 | @Data
|
---|
13 | @Entity
|
---|
14 | @Table(name = "pet_needs_intervention_in_vet_clinic")
|
---|
15 | public class PetNeedsInterventionInVetClinic {
|
---|
16 |
|
---|
17 | @Id
|
---|
18 | @Column(name = "id_pet", nullable = false)
|
---|
19 | private int petId;
|
---|
20 |
|
---|
21 | @Id
|
---|
22 | @Column(name = "id_vet_clinic", nullable = false)
|
---|
23 | private int vetClinicId;
|
---|
24 |
|
---|
25 | @Column(name = "date_of_interventing", nullable = false)
|
---|
26 | private LocalDate interventionDate;
|
---|
27 |
|
---|
28 | @Column(name = "description", length = 100)
|
---|
29 | private String description;
|
---|
30 |
|
---|
31 | public PetNeedsInterventionInVetClinic(int petId, int vetClinicId, LocalDate interventionDate, String description) {
|
---|
32 | this.petId = petId;
|
---|
33 | this.vetClinicId = vetClinicId;
|
---|
34 | this.interventionDate = interventionDate;
|
---|
35 | this.description = description;
|
---|
36 | }
|
---|
37 |
|
---|
38 | public PetNeedsInterventionInVetClinic() {
|
---|
39 |
|
---|
40 | }
|
---|
41 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.