Foodtruck Order — TypeScript Reference - v0.1.0
    Preparing search index...

    Interface OrderFinalizationRecord

    The append-only fact that an order was finalized, with the values it was finalized with.

    FinalizedOrder is current state — its status moves and, from MVP-TASK-024, its queue number and note are editable — so it cannot also be the record of what the order originally was. This record is that history: it is written once, in the same transaction that creates the order and its item snapshots, and it is never updated or deleted afterwards.

    Item facts live in FinalizedOrderItem rather than here, because they are per product and the item snapshots already capture them immutably.

    interface OrderFinalizationRecord {
        classification: OrderClassification;
        finalizedAt: Date;
        fulfillmentMode: FulfillmentMode;
        note: string | null;
        orderId: string;
        queueNumber: string | null;
    }
    Index
    classification: OrderClassification

    Sales classification the order was finalized with.

    finalizedAt: Date

    Database time at which finalization committed, which is also queue-entry time.

    fulfillmentMode: FulfillmentMode

    Fulfillment metadata the order was finalized with.

    note: string | null

    Order-level kitchen note the order entered service with.

    orderId: string

    Owning finalized-order identity; the internal system identity.

    queueNumber: string | null

    Queue display value the order entered service with, formatting preserved.