DineInOrder

data class DineInOrder(val id: OrderId, val restaurantId: RestaurantId, val customerId: CustomerId, val status: OrderStatus, val items: List<OrderItem>, val tableInfo: TableInfo) : Order

Represents a dine-in order in the system.

Constructors

Link copied to clipboard
constructor(id: OrderId, restaurantId: RestaurantId, customerId: CustomerId, status: OrderStatus, items: List<OrderItem>, tableInfo: TableInfo)

Properties

Link copied to clipboard
open override val customerId: CustomerId

The unique identifier for the customer who placed the order.

Link copied to clipboard
open override val id: OrderId

The unique identifier for the order.

Link copied to clipboard
open override val items: List<OrderItem>

A list of items included in the order.

Link copied to clipboard
open override val restaurantId: RestaurantId

The unique identifier for the restaurant where the order was placed.

Link copied to clipboard
open override val status: OrderStatus

The current status of the order.

Link copied to clipboard

Information about the table where the order will be served.

Functions

Link copied to clipboard

Cancels the order if it is in a cancellable state.

Link copied to clipboard

Advances the status of the order to the next logical state.

Link copied to clipboard

Converts an Order domain model to an OrderDocument for persistence.

Link copied to clipboard
Link copied to clipboard

Updates the items in the order after validating them.