- Create an ER diagram of the database
- Write Create table scripts script
- Create a new Java project
- Set up a MySQL database
- Add necessary libraries
- JDBC,
- MySQL Connector,
- JUnit,
- Dotenv
- User can create a new employee account
- Create Roles table
- Create Employees table
- Create Employee-Role table
- Implement Employee model
- Implement Role model
- Implement Employee-Role model
- Implement Role DAO (findAll, findById)
- Implement Employee DAO (create)
- Implements Employee-Role DAO (create)
- Form Validation
- First Name (null, empty)
- Last Name (null, empty)
- Email (Match email pattern)
- Phone Number(Match phone no pattern)
- Password (Must contain one lowercase, one uppercase, one number, one special character and length should be minimum 8 to maximum 24 characters)
- Address (null, empty)
- Business Validation
- Email already exists
- First Name cannot be nulll or empty
- Last Name cannot be null or empty
- Invalid Email id
- Invalid Phone Number
- Password should not match the pattern
- Address cannot be null or empty
- Email id already exist
graph TD;
A[Employee Service: Create User] --> B[Form Validation]
B -- Yes --> C{Unique Email Check}
B -- No --> G[Employee Service: Invalid input]
C -- Yes --> D[Employee DAO: Create User]
D --> E[Employee Service: User Created ]
C -- No --> F[Employee Service: Email Already Exists ]
- User can update an existing employee account
- Module 1 Feature 1
- Implement Employee DAO (update)
- Form Validation
- First Name (null, empty)
- Last Name (null, empty)
- Phone Number(Match phone no pattern)
- Password (Must contain one lowercase, one uppercase, one number, one special character and length should be minimum 8 to maximum 24 characters)
- Address (null, empty)
- Business Validation
- Only existing user details can be updated
- First Name cannot be nulll or empty
- Last Name cannot be null or empty
- Invalid Phone Number
- Password should not match the pattern
- Address cannot be null or empty
- Invalid Email id
graph TD;
A[Employee Service: Update User] --> B[Form Validation]
B -- Yes --> C{Check id exist in table}
B -- No --> G[Employee Service: Invalid input]
C -- Yes --> D[Employee DAO: Update User]
D --> E[Employee Service: User Updated]
C -- No --> F[Employee Service: User does not Exists ]
- User can create a new request
- Module 1 Feature 1
- Create Leave-Type table
- Implement Leave-Type model
- Implement Leave-Type DAO (findAll, findById)
- Create Request table
- Implement Request model
- Implement Request DAO (create)
- Form Validation
- Start date (greater than or equal to today)
- End date (greater than or equal to start date)
- Start date should be greater than or equal to today
- End date should be greater than or equal to start date
graph TD;
A[Request Service: Create Request]
A --> C{Form Validation}
C -- Yes --> D[Request DAO: Create Request]
D --> E[Request Service: Request Created ]
C -- No --> F[Request Service: Invalid entry]
- User can see all request
- Module 2 Feature 1
- Implement Request DAO (viewAll)
- Business Validation
- Request table must be already exist
- Table not Found
graph TD;
A[Request Service: View All Request]
A --> C{Checking Request table exist}
C -- Yes --> D[Request DAO: View All Requests]
D --> E[Request Service: Display the data]
C -- No --> F[Request Service: Invalid table name]
- User can update an existing request
- Module 2 Feature 1
- Module 2 Feature 2
- Implement Request DAO (update)
- Business Validation
- Only existing request can be updated
- Only the manager of the employee can update the request
graph TD;
A[Request Service: Update Request]
A --> C{Manager ID should match with user id in user-role table}
C -- Yes --> D[Request DAO: Update Request]
D --> E[Request Service: Request Updated]
C -- No --> F[Request Service: Invalid Manager id]