source: Prototype Application/Paw5/src/main/java/finki/paw5/model/entities/Employee.java@ 3d3e59d

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

move entity models to separate folder

  • Property mode set to 100644
File size: 1.3 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 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
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;
33 }
34
35 public Employee(String position, int shelterId, boolean verified, int verifiedByAdminId) {
36 this.position = position;
37 this.shelterId = shelterId;
38 this.verified = verified;
39 this.verifiedByAdminId = verifiedByAdminId;
40 }
41
42 public Employee() {
43
44 }
45
46}
Note: See TracBrowser for help on using the repository browser.