added domain data objects
This commit is contained in:
parent
570c19c35b
commit
8519c5c73f
@ -0,0 +1,32 @@
|
|||||||
|
package com.example.onomatopoeiaback.domain.employee;
|
||||||
|
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "employee")
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class Employee {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long id;
|
||||||
|
|
||||||
|
@Column(unique = true)
|
||||||
|
@NonNull
|
||||||
|
private String login;
|
||||||
|
@NonNull
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
private String name;
|
||||||
|
@NonNull
|
||||||
|
private String photo;
|
||||||
|
@NonNull
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
private LocalDateTime lastVisit;
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.example.onomatopoeiaback.domain.employee;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class EmployeeDTO {
|
||||||
|
private String login;
|
||||||
|
private String password;
|
||||||
|
private String name;
|
||||||
|
private String photo;
|
||||||
|
private String position;
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
package com.example.onomatopoeiaback.domain.visit;
|
||||||
|
|
||||||
|
import jakarta.persistence.*;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Table(name = "code")
|
||||||
|
@Entity
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class Visit {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
|
private long id;
|
||||||
|
|
||||||
|
private long value;
|
||||||
|
private VisitType visitType;
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
package com.example.onomatopoeiaback.domain.visit;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class VisitDTO {
|
||||||
|
private long value;
|
||||||
|
private VisitType visitType;
|
||||||
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
package com.example.onomatopoeiaback.domain.visit;
|
||||||
|
|
||||||
|
public enum VisitType {
|
||||||
|
PHONE_ENTRY,
|
||||||
|
CARD_ENTRY
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user