-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmployee.java
More file actions
63 lines (48 loc) · 1.7 KB
/
Employee.java
File metadata and controls
63 lines (48 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package TaskManagerProject;
import java.time.LocalDateTime;
import java.util.UUID;
import java.util.ArrayList;
import java.util.List;
// starting with "User Entity" then building "The Class Functionality or Service"
//Considering the Employee and the USER the same Thing.
public class Employee {
private UUID empID;
private String empName;
private String empEmail;
private String empPassword;
private LocalDateTime createdAt;
private String EmployeeRole; //will get a copy of only a single employee type from: Admin class
private List<Task> tasks = new ArrayList<>();
public Employee() {
}
public Employee(String name, String email, String empPassword,String EmployeeRole) {
this.empName = name;
this.empEmail = email;
this.empPassword = empPassword;
this.EmployeeRole = EmployeeRole;
this.empID = UUID.randomUUID(); //Automatically generated
this.createdAt = LocalDateTime.now(); //Automatically generated
}
// Getters and Setters
public UUID getEmpID() { return empID; }
public String getEmpName() { return empName; }
public List<Task> getTasks() { return tasks; }
public String getEmployeeRole() {
return EmployeeRole;
}
public void setEmpName(String empName) {
this.empName = empName;
}
public String getEmpEmail() {
return empEmail;
}
public void setEmpEmail(String empEmail) {
this.empEmail = empEmail;
}
public String getEmpPassword() {
return this.empPassword;
}
public void setEmpPassword(String empPassword) {
this.empPassword = empPassword;
}
}