[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;
|
---|
[fdd7961] | 9 | import lombok.RequiredArgsConstructor;
|
---|
[d427a07] | 10 |
|
---|
[579bf6d] | 11 | import java.time.LocalDate;
|
---|
| 12 |
|
---|
[d427a07] | 13 | @Data
|
---|
| 14 | @Entity
|
---|
| 15 | @Table(name = "adopter")
|
---|
[fdd7961] | 16 | @RequiredArgsConstructor
|
---|
[579bf6d] | 17 | @PrimaryKeyJoinColumn(name = "id_user")
|
---|
| 18 | public class Adopter extends User {
|
---|
[d427a07] | 19 |
|
---|
| 20 | @Column(name = "free_time")
|
---|
| 21 | private FreeTime freeTime;
|
---|
| 22 |
|
---|
| 23 | @Column(name = "funds")
|
---|
| 24 | private Funds funds;
|
---|
| 25 |
|
---|
| 26 | @Column(name = "has_other_pets")
|
---|
[aced08c] | 27 | private Boolean hasOtherPets;
|
---|
[d427a07] | 28 |
|
---|
| 29 | @Column(name = "has_kids")
|
---|
[aced08c] | 30 | private Boolean hasKids;
|
---|
[d427a07] | 31 |
|
---|
| 32 | @Column(name = "housing")
|
---|
| 33 | private Housing housing;
|
---|
| 34 |
|
---|
| 35 | @Column(name = "physical_activity_adopters")
|
---|
| 36 | private PhysicalActivity physicalActivity;
|
---|
| 37 |
|
---|
| 38 | @Column(name = "will_foster")
|
---|
[aced08c] | 39 | private Boolean willFoster;
|
---|
[d427a07] | 40 |
|
---|
| 41 | @Column(name = "is_verified", nullable = false)
|
---|
[aced08c] | 42 | private Boolean verified;
|
---|
[d427a07] | 43 |
|
---|
[fdd7961] | 44 | @ManyToOne
|
---|
| 45 | @JoinColumn(name = "verified_by_employee")
|
---|
| 46 | Employee employeeVerificator;
|
---|
[d427a07] | 47 |
|
---|
[579bf6d] | 48 | public Adopter(LocalDate dateCreated, String name, String email, String password, String telephone,
|
---|
| 49 | FreeTime freeTime, Funds funds, boolean hasOtherPets, boolean hasKids, Housing housing,
|
---|
[da44aef] | 50 | PhysicalActivity physicalActivity, boolean willFoster, boolean verified) {
|
---|
[579bf6d] | 51 | super(dateCreated, name, email, password, telephone);
|
---|
| 52 | this.freeTime = freeTime;
|
---|
| 53 | this.funds = funds;
|
---|
| 54 | this.hasOtherPets = hasOtherPets;
|
---|
| 55 | this.hasKids = hasKids;
|
---|
| 56 | this.housing = housing;
|
---|
| 57 | this.physicalActivity = physicalActivity;
|
---|
| 58 | this.willFoster = willFoster;
|
---|
| 59 | this.verified = verified;
|
---|
| 60 | }
|
---|
| 61 |
|
---|
[d427a07] | 62 | }
|
---|