Data model

Lists, relationships, and status values in the Grocery schema.

The registry in features/keystone/models/index.ts defines 66 lists. Everything is scoped to a Store. Money is stored in cents. Quantities of weighed goods are stored in thousandths.

Areas

AreaLists
Store and staffStore, StoreSettings, User, Role, StaffInvitation, StaffAccessEvent, RateLimitBucket
CatalogDepartment, Product, ProductInformationVersion, CatalogImport, Coupon, UserCoupon, Recipe, RecipeIngredient
InventoryInventoryLot, InventoryMovement, InventoryAdjustment, InventoryCount, InventoryRecall, InventoryConversion, OrderLineInventoryAllocation
PurchasingSupplier, PurchaseOrder, POItem, PurchaseReceipt, SupplierInvoice, SupplierCredit
Baskets and ordersCart, CartItem, CheckoutAttempt, Order, OrderLineItem, OrderItemSubstitution, SubstitutionPreference, OrderLineFulfillment, OrderSettlement
Pickup and deliveryPickupSlot, DeliverySlot, ParkingSpot, DeliveryRoute
Payments and financePaymentProvider, PaymentSession, Payment, PaymentRefund, OrderLineRefund, PaymentWebhookEvent, SettlementMatch, FinancialClose
CustomersAddress, ShoppingList, ShoppingListItem, FavoriteProduct, Subscription, SubscriptionRun, LoyaltyProgram, LoyaltyTransaction, LoyaltyRedemption, BackInStockAlert, PriceAlert, NotificationPreference
Messages and privacyContactMessage, CustomerMessage, CustomerPrivacyRequest, CustomerBatchRequest, GroceryOutboxEvent

Relationships

FromTo
ProductDepartment, Supplier, InventoryLot, ShoppingListItem, Subscription
InventoryLotProduct, Supplier, OrderLineInventoryAllocation
OrderUser, Address, OrderLineItem, Payment, CheckoutAttempt, DeliverySlot, PickupSlot, DeliveryRoute
OrderLineItemProduct, InventoryLot, OrderItemSubstitution, OrderLineFulfillment
PurchaseOrderSupplier, POItem, PurchaseReceipt
PaymentOrder, PaymentProvider, PaymentRefund, PaymentWebhookEvent
RoleStore, User

Status values

ListValues
Orderpending, picking, packed, out_for_delivery, delivered, delivery_failed, delivery_refused, returned, cancelled
Productdraft, published, archived
PurchaseOrderdraft, sent, confirmed, received, cancelled
Paymentpending, authorized, processing, succeeded, failed, cancelled, refunded, partially_refunded
PaymentRefundprocessing, succeeded, failed, canceled
DeliveryRouteplanning, in_progress, completed
CheckoutAttemptpending, settled_pending_finalize, finalizing, finalized, compensation_required, compensation_processing, compensated, failed
ContactMessagenew, in_progress, replied, closed
OrderLineFulfillment.resolutionpicked, short, substituted

Most lifecycle lists block generated create, update, and delete. They change through the named commands, which take an idempotency key.

On this page