Package-level declarations

Types

Link copied to clipboard
value class CustomerId(val value: String)

Represents the unique identifier for a customer.

Link copied to clipboard
data class DeliveryInfo(val estimatedDeliveryTime: Long, val deliveryAddress: String, val bellName: String, val customerPhone: String)

Represents the delivery information associated with a delivery order.

Link copied to clipboard
data class DeliveryOrder(val id: OrderId, val restaurantId: RestaurantId, val customerId: CustomerId, val status: OrderStatus, val items: List<OrderItem>, val deliveryInfo: DeliveryInfo) : Order

Represents a delivery order in the system.

Link copied to clipboard
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.

Link copied to clipboard
value class MenuItemId(val value: String)

Represents the unique identifier for a menu item.

Link copied to clipboard
sealed class Order : Entity<OrderId>

Represents an order in the system, which can be of different types (Delivery, Takeaway, DineIn).

Link copied to clipboard
class OrderId(value: String = newId()) : UUIDEntityId

Represents the unique identifier for an Order entity.

Link copied to clipboard
data class OrderItem(val menuItemId: MenuItemId, val quantity: Int)

Represents an item in an order, consisting of a menu item ID and the quantity ordered.

Link copied to clipboard

Represents the status of an order in the system.

Link copied to clipboard
value class RestaurantId(val value: String)

Represents the unique identifier for an order.

Link copied to clipboard
data class TableInfo(val tableNumber: Int, val numberOfGuests: Int)

Represents information about a table in a restaurant.

Link copied to clipboard
data class TakeawayInfo(val pickupTime: Long, val customerName: String)

Represents information about a takeaway order.

Link copied to clipboard
data class TakeawayOrder(val id: OrderId, val restaurantId: RestaurantId, val customerId: CustomerId, val status: OrderStatus, val items: List<OrderItem>, val takeawayInfo: TakeawayInfo) : Order

Represents a takeaway order in the system.