[3d3e59d] | 1 | package finki.paw5.model.entities;
|
---|
[d427a07] | 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;
|
---|
[579bf6d] | 7 | import jakarta.persistence.*;
|
---|
[d427a07] | 8 | import lombok.Data;
|
---|
| 9 |
|
---|
[579bf6d] | 10 | import java.time.LocalDate;
|
---|
| 11 |
|
---|
[d427a07] | 12 | @Data
|
---|
| 13 | @Entity
|
---|
| 14 | @Table(name = "adopter")
|
---|
[579bf6d] | 15 | @PrimaryKeyJoinColumn(name = "id_user")
|
---|
| 16 | public class Adopter extends User {
|
---|
[d427a07] | 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 int verifiedByEmployeeId;
|
---|
| 44 |
|
---|
[579bf6d] | 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, int verifiedByEmployeeId) {
|
---|
| 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 | this.verifiedByEmployeeId = verifiedByEmployeeId;
|
---|
| 58 | }
|
---|
| 59 |
|
---|
| 60 | public Adopter(FreeTime freeTime, Funds funds, boolean hasOtherPets, boolean hasKids, Housing housing,
|
---|
| 61 | PhysicalActivity physicalActivity, boolean willFoster, boolean verified, int verifiedByEmployeeId) {
|
---|
[d427a07] | 62 | this.freeTime = freeTime;
|
---|
| 63 | this.funds = funds;
|
---|
| 64 | this.hasOtherPets = hasOtherPets;
|
---|
| 65 | this.hasKids = hasKids;
|
---|
| 66 | this.housing = housing;
|
---|
| 67 | this.physicalActivity = physicalActivity;
|
---|
| 68 | this.willFoster = willFoster;
|
---|
| 69 | this.verified = verified;
|
---|
| 70 | this.verifiedByEmployeeId = verifiedByEmployeeId;
|
---|
| 71 | }
|
---|
| 72 |
|
---|
| 73 | public Adopter() {
|
---|
| 74 | }
|
---|
| 75 | }
|
---|