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

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

register functionality

  1. Changed css of login.html
  2. Changed css and html of register
  3. Foreign keys in Adopter and Employee changed from int to Integer
  4. AuthorisationService updated with methods for employee and adopter registration
  5. RegisterController works only for employee and adopter
  6. Added services for Organisation and Shelter for dropdown list on registration form
  • Property mode set to 100644
File size: 2.3 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 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}
Note: See TracBrowser for help on using the repository browser.