source: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Adopter.java@ aced08c

main
Last change on this file since aced08c was aced08c, checked in by trajchevaM <118018439+trajchevaM@…>, 17 months ago

Updated RegisterController and Adopter

Changed primitive types of Adopter

  • Property mode set to 100644
File size: 2.3 KB
RevLine 
[3d3e59d]1package finki.paw5.model.entities;
[d427a07]2
3import finki.paw5.model.enumerations.FreeTime;
4import finki.paw5.model.enumerations.Funds;
5import finki.paw5.model.enumerations.Housing;
6import finki.paw5.model.enumerations.PhysicalActivity;
[579bf6d]7import jakarta.persistence.*;
[d427a07]8import lombok.Data;
9
[579bf6d]10import java.time.LocalDate;
11
[d427a07]12@Data
13@Entity
14@Table(name = "adopter")
[579bf6d]15@PrimaryKeyJoinColumn(name = "id_user")
16public 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")
[aced08c]25 private Boolean hasOtherPets;
[d427a07]26
27 @Column(name = "has_kids")
[aced08c]28 private Boolean hasKids;
[d427a07]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")
[aced08c]37 private Boolean willFoster;
[d427a07]38
39 @Column(name = "is_verified", nullable = false)
[aced08c]40 private Boolean verified;
[d427a07]41
42 @Column(name = "verified_by_employee")
[da44aef]43 private Integer verifiedByEmployeeId;
[d427a07]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,
[da44aef]47 PhysicalActivity physicalActivity, boolean willFoster, boolean verified) {
[579bf6d]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) {
[d427a07]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}
Note: See TracBrowser for help on using the repository browser.