Ignore:
Timestamp:
02/03/23 10:49:45 (17 months ago)
Author:
SazdovaEkaterina <sazdovaekaterina@…>
Branches:
main
Children:
e294983
Parents:
4885da3 (diff), 579bf6d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'create-models' into adopting-a-pet

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Prototype Application/Paw5/src/main/java/finki/paw5/model/Employee.java

    r4885da3 r8ae6217  
    11package finki.paw5.model;
    22
    3 import jakarta.persistence.Column;
    4 import jakarta.persistence.Entity;
    5 import jakarta.persistence.Id;
    6 import jakarta.persistence.Table;
     3import jakarta.persistence.*;
    74import lombok.Data;
     5
     6import java.time.LocalDate;
    87
    98@Data
    109@Entity
    1110@Table(name = "employee")
    12 public class Employee {
    13 
    14     @Id
    15     @Column(name = "id_user", nullable = false)
    16     private int id;
     11@PrimaryKeyJoinColumn(name = "id_user")
     12public class Employee extends User {
    1713
    1814    @Column(name = "position_employee", nullable = false, length = 20)
     
    2824    private int verifiedByAdminId;
    2925
    30     public Employee() {
    31 
    32     }
    33 
    34     public Employee(int id, String position, int shelterId, boolean verified, int verifiedByAdminId) {
    35         this.id = id;
     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);
    3629        this.position = position;
    3730        this.shelterId = shelterId;
     
    4033    }
    4134
     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
    4246}
Note: See TracChangeset for help on using the changeset viewer.