Book (v1.0.0)

Book domain entity, encapsulates book information and business rules

Overview

This entity represents a book in the catalog. It encapsulates book information and business rules, such as a unique identifier, a title, a description, an image, a price, a status, an average rating, a total number of reviews, a category, a publisher, and a flag indicating whether the book is deleted or not. The entity also has a version property for optimistic concurrency control.

Entity Properties

NameTypeRequiredDescription
idUUIDRequiredUnique identifier for the book
namestringRequiredA title of the book
descriptionstringOptionalDescription of the book
imagestringOptionalImage of the book
pricePriceRequiredPrice of the book include Original price and Sale price
statusintRequiredStatus of the book
averageRatingdoubleRequiredAverage rating of the book
totalReviewsintRequiredTotal number of reviews for the book
categoryIdUUIDRequiredUnique identifier for the category
publisherIdUUIDRequiredUnique identifier for the publisher
isDeletedboolRequiredWhether the book is deleted or not
createdAtDateTimeRequiredThe date and time the book was created
lastModifiedAtDateTimeOptionalThe date and time the book was updated
versionUUIDRequiredVersion of the record for optimistic concurrency control

Entity Relationships

  • A book is categorized under one category
  • A book is published by one publisher
  • A book is written by multiple authors
  • A book has multiple reviews
  • A book is ordered by multiple orders
  • A book is added to multiple baskets