[d427a07] | 1 | package finki.paw5.model;
|
---|
| 2 |
|
---|
[579bf6d] | 3 | import jakarta.persistence.*;
|
---|
[d427a07] | 4 | import lombok.Data;
|
---|
| 5 |
|
---|
[579bf6d] | 6 | import java.time.LocalDate;
|
---|
| 7 |
|
---|
[d427a07] | 8 | @Data
|
---|
| 9 | @Entity
|
---|
| 10 | @Table(name = "employee")
|
---|
[579bf6d] | 11 | @PrimaryKeyJoinColumn(name = "id_user")
|
---|
| 12 | public class Employee extends User {
|
---|
[d427a07] | 13 |
|
---|
| 14 | @Column(name = "position_employee", nullable = false, length = 20)
|
---|
| 15 | private String position;
|
---|
| 16 |
|
---|
| 17 | @Column(name = "id_shelter", nullable = false)
|
---|
| 18 | private int shelterId;
|
---|
| 19 |
|
---|
| 20 | @Column(name = "is_verified", nullable = false)
|
---|
| 21 | private boolean verified;
|
---|
| 22 |
|
---|
| 23 | @Column(name = "verified_by_admin")
|
---|
| 24 | private int verifiedByAdminId;
|
---|
| 25 |
|
---|
[579bf6d] | 26 | public Employee(LocalDate dateCreated, String name, String email, String password, String telephone,
|
---|
| 27 | String position, int shelterId, boolean verified, int verifiedByAdminId) {
|
---|
| 28 | super(dateCreated, name, email, password, telephone);
|
---|
| 29 | this.position = position;
|
---|
| 30 | this.shelterId = shelterId;
|
---|
| 31 | this.verified = verified;
|
---|
| 32 | this.verifiedByAdminId = verifiedByAdminId;
|
---|
[d427a07] | 33 | }
|
---|
| 34 |
|
---|
[579bf6d] | 35 | public Employee(String position, int shelterId, boolean verified, int verifiedByAdminId) {
|
---|
[d427a07] | 36 | this.position = position;
|
---|
| 37 | this.shelterId = shelterId;
|
---|
| 38 | this.verified = verified;
|
---|
| 39 | this.verifiedByAdminId = verifiedByAdminId;
|
---|
| 40 | }
|
---|
| 41 |
|
---|
[579bf6d] | 42 | public Employee() {
|
---|
| 43 |
|
---|
| 44 | }
|
---|
| 45 |
|
---|
[d427a07] | 46 | }
|
---|