Skip to content

feat(Book): Add status property to Book model

paulwababu requested to merge feature/add-status-property-book-model into dev

Merge Request Title:

Add status Property to Book Model

Description:

Context:

This merge request introduces a status property to the existing Book model. This new property will be a positive integer, used to indicate if a book is in a particular state, such as maintenance mode.

Changes:

  • A new status property was added to the Book model. This property is a positive integer and has a default value of 0.
  • The Knex migration script 1689687960-add-status-to-book.js was created to alter the Book table in the database to include this new status property.

Testing:

To test these changes, follow these steps:

  1. Run the new migration script to update the Book table structure.
  2. Create a new book or retrieve an existing one, and check that the status property exists and defaults to 0 if not explicitly set.

Note:

The addition of this new property is in preparation for future functionalities where the status of the book may be needed, such as indicating a book's availability or maintenance mode.

Associated task:

  • Task: "Add status property in the Book model"

Commits:

  • feat(Book): Add status property to Book model
  • feat(Migration): Add migration script for adding status property to Book model

This request awaits your review and approval. Feel free to comment if you have any concerns or suggestions.

Merge request reports