BasketItem (v1.0.0)
Basket item domain entity, encapsulates basket item information and business rules
Overview
The basket item entity represents a basket item in the orders. It encapsulates basket item information and business rules such as a unique identifier, a book identifier, and a quantity. A basket item is an aggregate root that captures the user’s intent to purchase a specific book. The entity enforces invariants across its properties and manages the lifecycle of the book in the basket.
Entity Properties
Name | Type | Required | Description |
---|---|---|---|
id | UUID | Required | Unique identifier for the book |
quantity | integer | Required | Quantity of the book in the basket |
Entity Relationships
- A basket item is associated with one book
- A basket item is associated with one basket