main
Last change
on this file since 988f3fa 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:
937 bytes
|
Line | |
---|
1 | package finki.paw5.model.entities;
|
---|
2 |
|
---|
3 | import jakarta.persistence.*;
|
---|
4 | import lombok.Data;
|
---|
5 |
|
---|
6 | import java.time.LocalDate;
|
---|
7 | import java.util.Date;
|
---|
8 |
|
---|
9 | @Data
|
---|
10 | @Entity
|
---|
11 | @Table(name = "adoption")
|
---|
12 | public class Adoption {
|
---|
13 |
|
---|
14 | @Id
|
---|
15 | @GeneratedValue(strategy = GenerationType.IDENTITY)
|
---|
16 | @Column(name = "id_adoption")
|
---|
17 | private Integer id;
|
---|
18 |
|
---|
19 | @Column(name = "start_date", nullable = false)
|
---|
20 | private LocalDate startDate;
|
---|
21 |
|
---|
22 | @Column(name = "end_date_foster")
|
---|
23 | private LocalDate endDateFoster;
|
---|
24 |
|
---|
25 | @Column(name = "approved", nullable = false)
|
---|
26 | private boolean approved;
|
---|
27 |
|
---|
28 | @Column(name = "id_adopter", nullable = false)
|
---|
29 | private int adopterId;
|
---|
30 |
|
---|
31 | public Adoption(LocalDate startDate, LocalDate endDateFoster, boolean approved, int adopterId) {
|
---|
32 | this.startDate = startDate;
|
---|
33 | this.endDateFoster = endDateFoster;
|
---|
34 | this.approved = approved;
|
---|
35 | this.adopterId = adopterId;
|
---|
36 | }
|
---|
37 |
|
---|
38 | public Adoption() {
|
---|
39 | }
|
---|
40 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.