package contract import ( "time" "github.com/google/uuid" ) type CreateSelfOrderRequest struct { CustomerName string `json:"customer_name" validate:"required,min=1,max=255"` PhoneNumber *string `json:"phone_number,omitempty" validate:"omitempty"` OrderItems []SelfOrderItemRequest `json:"order_items" validate:"required,min=1,dive"` Notes *string `json:"notes,omitempty" validate:"omitempty,max=1000"` } type SelfOrderItemRequest struct { ProductID uuid.UUID `json:"product_id" validate:"required"` ProductVariantID *uuid.UUID `json:"product_variant_id,omitempty"` Quantity int `json:"quantity" validate:"required,min=1"` Notes *string `json:"notes,omitempty" validate:"omitempty,max=500"` } type SelfOrderResponse struct { OrderID uuid.UUID `json:"order_id"` OrderNumber string `json:"order_number"` TableID uuid.UUID `json:"table_id"` TableName string `json:"table_name"` OutletID uuid.UUID `json:"outlet_id"` OutletName string `json:"outlet_name"` CustomerName string `json:"customer_name"` OrderItems []OrderItemResponse `json:"order_items"` Subtotal float64 `json:"subtotal"` TaxAmount float64 `json:"tax_amount"` TotalAmount float64 `json:"total_amount"` Status string `json:"status"` CreatedAt time.Time `json:"created_at"` } type SelfOrderMenuResponse struct { OutletID uuid.UUID `json:"outlet_id"` OutletName string `json:"outlet_name"` TableID uuid.UUID `json:"table_id"` TableName string `json:"table_name"` Organization OrganizationMenuInfo `json:"organization"` Products ListProductsResponse `json:"products"` } type OrganizationMenuInfo struct { ID uuid.UUID `json:"id"` Name string `json:"name"` }