source: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Employee.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: 1.2 KB
Line 
1package finki.paw5.model.entities;
2
3import jakarta.persistence.*;
4import lombok.Data;
5
6import java.time.LocalDate;
7
8@Data
9@Entity
10@Table(name = "employee")
11@PrimaryKeyJoinColumn(name = "id_user")
12public class Employee extends User {
13
14 @Column(name = "position_employee", nullable = false, length = 20)
15 private String position;
16
17 @Column(name = "id_shelter", nullable = false)
18 private Integer shelterId;
19
20 @Column(name = "is_verified", nullable = false)
21 private boolean verified;
22
23 @Column(name = "verified_by_admin")
24 private Integer verifiedByAdminId;
25
26 public Employee(LocalDate dateCreated, String name, String email, String password, String telephone,
27 String position, int shelterId, boolean verified) {
28 super(dateCreated, name, email, password, telephone);
29 this.position = position;
30 this.shelterId = shelterId;
31 this.verified = verified;
32 }
33
34 public Employee(String position, int shelterId, boolean verified, int verifiedByAdminId) {
35 this.position = position;
36 this.shelterId = shelterId;
37 this.verified = verified;
38 this.verifiedByAdminId = verifiedByAdminId;
39 }
40
41 public Employee() {
42
43 }
44
45}
Note: See TracBrowser for help on using the repository browser.