1.2 KiB
1.2 KiB
Restaurant Lifecycle Store
Related Master Plan: plan/2026-03-31-s44-master-shared-restaurant-lifecycle.md
Purpose
operations-dal persists the shared restaurant order and check state that waiter, customer, kitchen, and POS flows will operate on together.
Persisted Shapes
Order and Check Record
The lifecycle store keeps one shared record per restaurant order containing:
ContextIdOrderIdCheckIdTableIdOrderStateCheckStateGuestCountHasKitchenTicketOutstandingBalanceCurrencySourceItemIdsUpdatedAtUtc
Event History
The store also keeps an append-only event stream per order so services and BFFs can expose recent lifecycle activity without synthesizing it from isolated arrays.
Query Shape
The DAL exposes internal access patterns for:
- load one order by context and order id
- list orders by context
- list payable orders by context
- append and list lifecycle events by order
Ownership Boundary
operations-domainowns the lifecycle rules.operations-dalowns durable storage for the shared restaurant order/check state.kitchen-dalwill persist kitchen ticket execution separately while sharing the restaurant identities.