PlaceOrderCommand
Command to place an order in the system.
This sealed interface defines the structure of the command for placing an order, which can be of three types: Delivery, Takeaway, or DineIn. Each type has its own specific fields relevant to the order type.
Inheritors
Types
Link copied to clipboard
data class Delivery(val restaurantId: RestaurantId, val customerId: CustomerId, val items: List<OrderItem>, val estimatedDeliveryTime: Long, val deliveryAddress: String, val bellName: String, val customerPhone: String) : PlaceOrderCommand
Represents a delivery order with specific fields for delivery details.
Link copied to clipboard
data class DineIn(val restaurantId: RestaurantId, val customerId: CustomerId, val items: List<OrderItem>, val tableNumber: Int, val numberOfGuests: Int) : PlaceOrderCommand
Represents a dine-in order with specific fields for table details.
Link copied to clipboard
data class Takeaway(val restaurantId: RestaurantId, val customerId: CustomerId, val items: List<OrderItem>, val pickupTime: Long, val customerName: String) : PlaceOrderCommand
Represents a takeaway order with specific fields for pickup details.