main
Last change
on this file since 4885da3 was fdfc6fa, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 19 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:
973 bytes
|
Line | |
---|
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.time.LocalDate;
|
---|
10 | import java.util.Date;
|
---|
11 |
|
---|
12 | @Data
|
---|
13 | @Entity
|
---|
14 | @Table(name = "adoption")
|
---|
15 | public class Adoption {
|
---|
16 |
|
---|
17 | @Id
|
---|
18 | @Column(name = "id_adoption")
|
---|
19 | private int id;
|
---|
20 |
|
---|
21 | @Column(name = "start_date", nullable = false)
|
---|
22 | private LocalDate startDate;
|
---|
23 |
|
---|
24 | @Column(name = "end_date_foster")
|
---|
25 | private LocalDate endDateFoster;
|
---|
26 |
|
---|
27 | @Column(name = "approved", nullable = false)
|
---|
28 | private boolean approved;
|
---|
29 |
|
---|
30 | @Column(name = "id_adopter", nullable = false)
|
---|
31 | private int adopterId;
|
---|
32 |
|
---|
33 | public Adoption(LocalDate startDate, LocalDate endDateFoster, boolean approved, int adopterId) {
|
---|
34 | this.startDate = startDate;
|
---|
35 | this.endDateFoster = endDateFoster;
|
---|
36 | this.approved = approved;
|
---|
37 | this.adopterId = adopterId;
|
---|
38 | }
|
---|
39 |
|
---|
40 | public Adoption() {
|
---|
41 | }
|
---|
42 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.