[JITERA] Implement Reader-Book Management Module
Created by: chi-jitera
Overview
This pull request introduces a new module to manage the relationships between readers and books. It includes the creation of a ReaderBook model, a controller for handling operations, a service for business logic, and routes for API endpoints. This module will allow us to track which reader is reading which book.
Changes
-
Create ReaderBook Model:
- Implemented the
ReaderBookschema inmodels/ReaderBook.jsto define the structure of the data that tracks the relationship between readers and books.
- Implemented the
-
Create ReaderBook Controller:
- Developed the
readerBookControllerincontrollers/readerBookController.jsto handle CRUD operations related to reader-book relationships, including adding, removing, and retrieving records.
- Developed the
-
Create ReaderBook Service:
- Created the
readerBookServiceinservices/readerBookService.jsto encapsulate the business logic for managing reader-book relationships, ensuring separation of concerns.
- Created the
-
Define Routes for ReaderBook:
- Set up the necessary routes in
routes/readerBookRoutes.jsto expose endpoints for the reader-book operations, allowing clients to interact with the module.
- Set up the necessary routes in
-
Update Server to Include ReaderBook Routes:
- Modified
server.jsto integrate the new reader-book routes, ensuring that the application can handle requests related to reader-book management.
- Modified
This implementation provides a comprehensive solution for managing the relationships between readers and books, enhancing the overall functionality of the application.