[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 books effectively.
Changes
-
ReaderBook Model:
- Created
models/ReaderBook.jsto define the schema for theReaderBookmodel. This model establishes a many-to-many relationship between readers and books, allowing us to track which reader is associated with which book.
- Created
-
ReaderBook Controller:
- Implemented
controllers/readerBookController.jsto handle CRUD operations related to reader-book relationships. This includes functions to create, read, update, and delete records in theReaderBookmodel.
- Implemented
-
ReaderBook Service:
- Developed
services/readerBookService.jsto encapsulate the business logic for managing reader-book relationships. This service interacts with theReaderBookmodel and provides methods that the controller can call.
- Developed
-
ReaderBook Routes:
- Set up
routes/readerBookRoutes.jsto define the API endpoints for reader-book operations. This includes routes for creating, retrieving, updating, and deleting reader-book relationships.
- Set up
-
Server Integration:
- Updated
server.jsto include the newly created reader-book routes, ensuring that the application can handle requests related to reader-book management.
- Updated
This implementation provides a comprehensive solution for managing the relationships between readers and books, enhancing the overall functionality of the application.