1 | package finki.paw5.model.entities;
|
---|
2 |
|
---|
3 | import finki.paw5.model.enumerations.FreeTime;
|
---|
4 | import finki.paw5.model.enumerations.Funds;
|
---|
5 | import finki.paw5.model.enumerations.Housing;
|
---|
6 | import finki.paw5.model.enumerations.PhysicalActivity;
|
---|
7 | import jakarta.persistence.*;
|
---|
8 | import lombok.Data;
|
---|
9 |
|
---|
10 | import java.time.LocalDate;
|
---|
11 |
|
---|
12 | @Data
|
---|
13 | @Entity
|
---|
14 | @Table(name = "adopter")
|
---|
15 | @PrimaryKeyJoinColumn(name = "id_user")
|
---|
16 | public class Adopter extends User {
|
---|
17 |
|
---|
18 | @Column(name = "free_time")
|
---|
19 | private FreeTime freeTime;
|
---|
20 |
|
---|
21 | @Column(name = "funds")
|
---|
22 | private Funds funds;
|
---|
23 |
|
---|
24 | @Column(name = "has_other_pets")
|
---|
25 | private Boolean hasOtherPets;
|
---|
26 |
|
---|
27 | @Column(name = "has_kids")
|
---|
28 | private Boolean hasKids;
|
---|
29 |
|
---|
30 | @Column(name = "housing")
|
---|
31 | private Housing housing;
|
---|
32 |
|
---|
33 | @Column(name = "physical_activity_adopters")
|
---|
34 | private PhysicalActivity physicalActivity;
|
---|
35 |
|
---|
36 | @Column(name = "will_foster")
|
---|
37 | private Boolean willFoster;
|
---|
38 |
|
---|
39 | @Column(name = "is_verified", nullable = false)
|
---|
40 | private Boolean verified;
|
---|
41 |
|
---|
42 | @Column(name = "verified_by_employee")
|
---|
43 | private Integer verifiedByEmployeeId;
|
---|
44 |
|
---|
45 | public Adopter(LocalDate dateCreated, String name, String email, String password, String telephone,
|
---|
46 | FreeTime freeTime, Funds funds, boolean hasOtherPets, boolean hasKids, Housing housing,
|
---|
47 | PhysicalActivity physicalActivity, boolean willFoster, boolean verified) {
|
---|
48 | super(dateCreated, name, email, password, telephone);
|
---|
49 | this.freeTime = freeTime;
|
---|
50 | this.funds = funds;
|
---|
51 | this.hasOtherPets = hasOtherPets;
|
---|
52 | this.hasKids = hasKids;
|
---|
53 | this.housing = housing;
|
---|
54 | this.physicalActivity = physicalActivity;
|
---|
55 | this.willFoster = willFoster;
|
---|
56 | this.verified = verified;
|
---|
57 | }
|
---|
58 |
|
---|
59 | public Adopter(FreeTime freeTime, Funds funds, boolean hasOtherPets, boolean hasKids, Housing housing,
|
---|
60 | PhysicalActivity physicalActivity, boolean willFoster, boolean verified, int verifiedByEmployeeId) {
|
---|
61 | this.freeTime = freeTime;
|
---|
62 | this.funds = funds;
|
---|
63 | this.hasOtherPets = hasOtherPets;
|
---|
64 | this.hasKids = hasKids;
|
---|
65 | this.housing = housing;
|
---|
66 | this.physicalActivity = physicalActivity;
|
---|
67 | this.willFoster = willFoster;
|
---|
68 | this.verified = verified;
|
---|
69 | this.verifiedByEmployeeId = verifiedByEmployeeId;
|
---|
70 | }
|
---|
71 |
|
---|
72 | public Adopter() {
|
---|
73 | }
|
---|
74 | }
|
---|