OrderItem (v1.0.0)

Represents a single item within a customer's order.

Overview

The OrderItem entity details a specific product and its quantity requested within an Order. It holds information about the product, the quantity ordered, and the price calculation for that line item. OrderItems are part of the Order aggregate.

Entity Properties

Name Type Required Description
orderItemIdUUIDRequiredUnique identifier for the order item
orderIdUUIDRequiredIdentifier for the parent Order
productIdUUIDRequiredIdentifier for the product being ordered
productNamestringOptionalName of the product at the time of order
quantityintegerRequiredNumber of units of the product ordered
unitPricedecimalRequiredPrice per unit of the product at the time of order
totalPricedecimalRequiredTotal price for this item line (quantity * unitPrice)

Relationships

  • Order: Each OrderItem belongs to exactly one Order (identified by orderId). It is a constituent part of the Order aggregate.
  • Product: Each OrderItem refers to one Product (identified by productId).

Examples

  • OrderItem A (for Order #12345): Product ID: P001, Quantity: 2, Unit Price: $50.00, Total Price: $100.00
  • OrderItem B (for Order #12345): Product ID: P002, Quantity: 1, Unit Price: $75.00, Total Price: $75.00