Once an employee is returned from their travel they will use this module to claim reimbursements for various expenses like food, daily transportation and laundry service which they utilized during their course of stay on the travel location. This module will provide the following facilities.
- It will allow the employees to create a new Reimbursement request
- A travel desk executive can process the request by either accepting it or rejecting it
- The HRs should be able to see the expenses incurred by the employee under various expense types in the form of a report
- Design a data base as per the following ER diagram provided.
- Enfore the following constraints along with primary and foreign keys a. Request date must be automatically taken as current date b. Allowed values for the status is – new/approved/rejected c. ProcessedOn must not be a past date d. Invoice date must be a passed date
Note: Feed the data into the ReimbursementTypes table when the application starts. Values can be Food/Water/Laundry/LocalTravel
- Create a library project and add ORM support into it.
- Use the ORM to map the entities to database as per the ER diagram provided.
- Use repository per entity pattern and generate the repositories to perform the following operations a. Return the available Reimbursement types b. Insert a new Reimbursement c. Return all Reimbursements by travel request id d. Process the reimbursement e. Return a reimbursement by id
- Develop a library which reference the Data Access Library project created earlier
- This class library will contain various service classes which will encapsulate the business logic for the application.
- Use dependency injection to in service classes to inject the required repositories.
- Create the service classes following the single responsibility principle which perform the given operations as follows
a. Return the available Reimbursement types b. Insert a new Reimbursement c. Return all Reimbursements by travel request id d. Process the reimbursement e. Return a reimbursement by id - Following business rules must be implemented as part of the business service class a. Allowed documents for uploading is pdf with the size of 256kb b. Invoice date must be with in the from and to date of the travel which can be obtained from travel planner c. If a reimbursement is rejected then a remarks must be provided. d. The total allowed expense per day for food, laundry and local travel is as follows i. Food and water – 1000-1500 per day ii. Laundry – 250-500 per day iii. Local travel – upto 1000 per day
- Create a new Unit test project to test the service classes created in business logic layers
- Mock all the repositories using a mocking framework.
- Create a API project which references the business logic layer created earlier
- Implement service documentation using swagger
- Create the following end-points and test them using postman and export the requests into a json file.