OrderItem

Represents a single item within a customer's order.

Entity

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
orderItemIdUUID Required Unique identifier for the order item
orderIdUUID Required Identifier for the parent Order
productIdUUID Required Identifier for the product being ordered
productNamestring Optional Name of the product at the time of order
quantityinteger Required Number of units of the product ordered
unitPricedecimal Required Price per unit of the product at the time of order
totalPricedecimal Required Total 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