Step 1: Define Entities & Properties
Entities and properties define the core data of the application. Key entities include User
, Team
, Employee
, and LeaveRequest
. Each of these entities has associated properties, such as FirstName
, LastName
, LeaveBalance
, and StartDate
, which stores specific data points.
This section outlines the purpose of each entity and the data it holds. Each entity plays a specific role in managing user information, team structures, employee data, and leave request processing.
Entities Needed for my Leave Request App
User Entity
The User entity holds essential information about individuals who use the system, whether they are employees, managers, or administrators.
The User entity is crucial for managing individual user profiles, handling authentication, and controlling role-based access within the system.
Below is the list of properties needed:
FirstName
Text
False
True
False
LastName
Text
False
True
False
Text
False
True
False
PhoneNumber
Text
True
True
False
Roles
Enum [Employee, Admin, Manager]
True
True
True
Status
Enum [Active/Inactive]
False
True
False
Department Entity
The Department entity represents organizational groups or departments, helping to structure the organization and assign employees to their respective teams.
The Department entity organizes employees into logical groups, ensuring users can be assigned to teams and managed appropriately. It also facilitates team-level operations such as leave approvals and oversight by team managers.
Below is the list of properties needed:
Name
Text
False
True
False
ManagerID
Entity Reference [User Entity]
False
True
False
Employee Entity
The Employee entity captures information specific to an individual’s role as an employee in the organization.
The Employee entity holds employment-specific data, differentiating general users from employees and associating them with teams and their leave entitlements. This enables the system to manage human resources more effectively.
Below is the list of properties needed:
UserID
Entity Reference [User Entity]
False
True
False
DepartmentID
Entity Reference [Department Entity]
False
True
False
LeaveBalance
Decimal
True
True
False
LeaveRequest Entity
The LeaveRequests entity manages employee leave requests, including the request details, its status, and any approvals or rejections.
The LeaveRequests entity is vital for managing employee leave applications and tracking the approval process. It allows the system to handle various types of leave, monitor statuses, and maintain a transparent approval workflow.
Below is the list of properties needed:
RequesterID
Entity Reference [Employee Entity]
False
True
False
Status
Enum [Rejected, Approved, Pending, Cancelled]
False
True
False
LeaveType
Enum [SickLeave, Vacation]
False
True
False
StartDate
Date/Time
False
True
False
EndDate
Date/Time
False
True
False
Reason
Text
False
True
False
RejectedOn
Date/Time
True
True
False
ApprovedOn
Date/Time
True
True
False
RejectedBy
EntityReference [User Entity]
True
True
False
RejectedOn
EntityReference [User Entity]
True
True
False
Last updated