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

main
Last change on this file since a762b3a was 3d3e59d, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 17 months ago

move entity models to separate folder

  • Property mode set to 100644
File size: 2.4 KB
Line 
1package finki.paw5.model.entities;
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;
7import jakarta.persistence.*;
8import lombok.Data;
9
10import java.time.LocalDate;
11
12@Data
13@Entity
14@Table(name = "adopter")
15@PrimaryKeyJoinColumn(name = "id_user")
16public 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 int 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, 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) {
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}
Note: See TracBrowser for help on using the repository browser.