source:
Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Adoption.java@
9a180fd
Last change on this file since 9a180fd was 9a180fd, checked in by , 17 months ago | |
---|---|
|
|
File size: 922 bytes |
Rev | Line | |
---|---|---|
[3d3e59d] | 1 | package finki.paw5.model.entities; |
[d427a07] | 2 | |
[038c9f7] | 3 | import jakarta.persistence.*; |
[d427a07] | 4 | import lombok.Data; |
5 | ||
[fdfc6fa] | 6 | import java.time.LocalDate; |
[d427a07] | 7 | |
8 | @Data | |
9 | @Entity | |
10 | @Table(name = "adoption") | |
11 | public class Adoption { | |
12 | ||
13 | @Id | |
[038c9f7] | 14 | @GeneratedValue(strategy = GenerationType.IDENTITY) |
[d427a07] | 15 | @Column(name = "id_adoption") |
[ada7108] | 16 | private Integer id; |
[d427a07] | 17 | |
18 | @Column(name = "start_date", nullable = false) | |
[fdfc6fa] | 19 | private LocalDate startDate; |
[d427a07] | 20 | |
21 | @Column(name = "end_date_foster") | |
[fdfc6fa] | 22 | private LocalDate endDateFoster; |
[d427a07] | 23 | |
24 | @Column(name = "approved", nullable = false) | |
25 | private boolean approved; | |
26 | ||
27 | @Column(name = "id_adopter", nullable = false) | |
[9a180fd] | 28 | private Integer adopterId; |
[d427a07] | 29 | |
[9a180fd] | 30 | public Adoption(LocalDate startDate, LocalDate endDateFoster, boolean approved, Integer adopterId) { |
[d427a07] | 31 | this.startDate = startDate; |
32 | this.endDateFoster = endDateFoster; | |
33 | this.approved = approved; | |
34 | this.adopterId = adopterId; | |
35 | } | |
36 | ||
37 | public Adoption() { | |
38 | } | |
39 | } |
Note:
See TracBrowser
for help on using the repository browser.