Product (v1.0.0)

Represents a product or service available for purchase in the e-commerce system.

Overview

The Product entity represents items or services available for purchase in the e-commerce system. It serves as an aggregate root containing all product-related information including pricing, categorization, inventory details, and customer reviews.

Entity Properties

NameTypeRequiredDescription
productIdUUIDRequiredUnique identifier for the product
namestringRequiredName of the product
descriptionstringOptionalDetailed description of the product
skustringRequiredStock Keeping Unit - unique product identifier
pricedecimalRequiredCurrent selling price of the product
categoryIdUUIDRequiredCategory this product belongs to
brandstringOptionalBrand name of the product
weightdecimalOptionalWeight of the product in kilograms
dimensionsobjectOptionalProduct dimensions (length, width, height)
isActivebooleanRequiredWhether the product is currently available for sale
createdAtDateTimeRequiredDate and time when the product was created
updatedAtDateTimeOptionalDate and time when the product was last updated
imagesarrayOptionalURLs of product images
inventoryInventoryOptionalInventory information for this product
reviewsarrayOptionalCustomer reviews for this product

Relationships

  • Category: Each product belongs to one Category (identified by categoryId).
  • Inventory: Each product has one Inventory record tracking stock levels.
  • Review: A product can have multiple Review entities from customers.
  • OrderItem: Products are referenced in OrderItem entities when included in orders.

Examples

  • Product #1: “iPhone 15 Pro” - Electronics category, $999.99, with 50 units in stock and 4.5-star reviews.
  • Product #2: “Running Shoes” - Sports category, $129.99, various sizes available, with detailed size chart.

Business Rules

  • Products must have a unique SKU across the entire catalog
  • Products cannot be deleted if they have associated order items
  • Price changes should be tracked for audit purposes
  • Products must belong to an active category to be purchasable