1 | package finki.paw5.model.entities;
|
---|
2 |
|
---|
3 | import jakarta.persistence.*;
|
---|
4 | import lombok.Data;
|
---|
5 |
|
---|
6 | import java.time.LocalDate;
|
---|
7 |
|
---|
8 | @Data
|
---|
9 | @Entity
|
---|
10 | @Table(name = "employee")
|
---|
11 | @PrimaryKeyJoinColumn(name = "id_user")
|
---|
12 | public 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 | }
|
---|