«repository» OrderRepository
+ save(order: Order) + find(id: UUID): Order
SqlOrderRepository
- dataSource: DataSource
+ save(order: Order) + find(id: UUID): Order
Customer
- id: UUID - name: String
+ placeOrder(): Order
PremiumCustomer {abstract}
- discountRate: Decimal
+ calculateDiscount(): Money
«aggregate-root» Order
- id: UUID - status: OrderStatus
+ confirm() + total(): Money
OrderLine
- productId: UUID - quantity: Integer
+ subtotal(): Money
OrderStatus {static}
Draft Confirmed Cancelled
OrderRepository responsibilities
det ail s
to <repository-detail>
from <class>
implements
specializes
places 1 → 0..*
contains 1 → 1..*
uses type
persists through
id
class
title
Ordering Domain
version
2026.07
id
repository-detail
title
Repository Contract
version
2026.07