main
Last change
on this file since 6a17c29 was d427a07, checked in by SazdovaEkaterina <sazdovaekaterina@…>, 17 months ago |
add models and enums
|
-
Property mode
set to
100644
|
File size:
986 bytes
|
Rev | Line | |
---|
[d427a07] | 1 | package finki.paw5.model;
|
---|
| 2 |
|
---|
| 3 | import jakarta.persistence.Column;
|
---|
| 4 | import jakarta.persistence.Entity;
|
---|
| 5 | import jakarta.persistence.Id;
|
---|
| 6 | import jakarta.persistence.Table;
|
---|
| 7 | import lombok.Data;
|
---|
| 8 |
|
---|
| 9 | @Data
|
---|
| 10 | @Entity
|
---|
| 11 | @Table(name = "employee")
|
---|
| 12 | public class Employee {
|
---|
| 13 |
|
---|
| 14 | @Id
|
---|
| 15 | @Column(name = "id_user", nullable = false)
|
---|
| 16 | private int id;
|
---|
| 17 |
|
---|
| 18 | @Column(name = "position_employee", nullable = false, length = 20)
|
---|
| 19 | private String position;
|
---|
| 20 |
|
---|
| 21 | @Column(name = "id_shelter", nullable = false)
|
---|
| 22 | private int shelterId;
|
---|
| 23 |
|
---|
| 24 | @Column(name = "is_verified", nullable = false)
|
---|
| 25 | private boolean verified;
|
---|
| 26 |
|
---|
| 27 | @Column(name = "verified_by_admin")
|
---|
| 28 | private int verifiedByAdminId;
|
---|
| 29 |
|
---|
| 30 | public Employee() {
|
---|
| 31 |
|
---|
| 32 | }
|
---|
| 33 |
|
---|
| 34 | public Employee(int id, String position, int shelterId, boolean verified, int verifiedByAdminId) {
|
---|
| 35 | this.id = id;
|
---|
| 36 | this.position = position;
|
---|
| 37 | this.shelterId = shelterId;
|
---|
| 38 | this.verified = verified;
|
---|
| 39 | this.verifiedByAdminId = verifiedByAdminId;
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.