2026-05-27 21:33:48 +03:30
|
|
|
using Meezi.Core.Enums;
|
|
|
|
|
|
|
|
|
|
namespace Meezi.API.Models.Orders;
|
|
|
|
|
|
|
|
|
|
public record OrderItemDto(
|
|
|
|
|
string Id,
|
|
|
|
|
string MenuItemId,
|
|
|
|
|
string MenuItemName,
|
|
|
|
|
int Quantity,
|
|
|
|
|
decimal UnitPrice,
|
|
|
|
|
string? Notes,
|
|
|
|
|
bool IsVoided = false,
|
|
|
|
|
DateTime? VoidedAt = null);
|
|
|
|
|
|
|
|
|
|
public record TransferTableRequest(string TargetTableId);
|
|
|
|
|
|
|
|
|
|
public record OrderDto(
|
|
|
|
|
string Id,
|
|
|
|
|
string CafeId,
|
|
|
|
|
string? BranchId,
|
|
|
|
|
string? TableId,
|
|
|
|
|
string? TableNumber,
|
|
|
|
|
string? GuestName,
|
|
|
|
|
string? GuestPhone,
|
|
|
|
|
string? CustomerName,
|
|
|
|
|
string? CustomerPhone,
|
|
|
|
|
string? CustomerId,
|
|
|
|
|
string? EmployeeId,
|
|
|
|
|
OrderType OrderType,
|
|
|
|
|
OrderSource Source,
|
|
|
|
|
OrderStatus Status,
|
|
|
|
|
decimal Subtotal,
|
|
|
|
|
decimal TaxTotal,
|
|
|
|
|
decimal DiscountAmount,
|
|
|
|
|
decimal Total,
|
|
|
|
|
decimal PaidAmount,
|
|
|
|
|
DateTime CreatedAt,
|
|
|
|
|
int DisplayNumber,
|
|
|
|
|
IReadOnlyList<OrderItemDto> Items,
|
|
|
|
|
IReadOnlyList<PaymentDto> Payments);
|
|
|
|
|
|
|
|
|
|
public record AppendOrderItemsRequest(IReadOnlyList<CreateOrderItemRequest> Items);
|
|
|
|
|
|
|
|
|
|
public record UpdateOrderSessionRequest(
|
|
|
|
|
string? GuestName,
|
|
|
|
|
string? GuestPhone,
|
|
|
|
|
string? CustomerId);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public record CreateOrderItemRequest(string MenuItemId, int Quantity, string? Notes);
|
|
|
|
|
|
|
|
|
|
public record CreateOrderRequest(
|
|
|
|
|
OrderType OrderType,
|
|
|
|
|
string? BranchId,
|
|
|
|
|
string? TableId,
|
|
|
|
|
string? ReservationId,
|
|
|
|
|
string? GuestName,
|
|
|
|
|
string? GuestPhone,
|
|
|
|
|
string? CustomerId,
|
|
|
|
|
string? CouponId,
|
|
|
|
|
IReadOnlyList<CreateOrderItemRequest> Items);
|
|
|
|
|
|
|
|
|
|
public record UpdateOrderStatusRequest(OrderStatus Status);
|
|
|
|
|
|
2026-05-31 11:06:24 +03:30
|
|
|
public record CancelOrderRequest(string? Reason);
|
|
|
|
|
|
2026-05-27 21:33:48 +03:30
|
|
|
public record CreatePaymentRequest(PaymentMethod Method, decimal Amount, string? Reference);
|
|
|
|
|
|
|
|
|
|
public record RecordPaymentsRequest(
|
|
|
|
|
IReadOnlyList<CreatePaymentRequest> Payments,
|
|
|
|
|
int? LoyaltyPointsToRedeem = null);
|
|
|
|
|
|
|
|
|
|
public record PaymentDto(string Id, PaymentMethod Method, decimal Amount, PaymentStatus Status, string? Reference);
|
|
|
|
|
|
|
|
|
|
public record LiveOrderDto(
|
|
|
|
|
string Id,
|
|
|
|
|
int DisplayNumber,
|
|
|
|
|
OrderStatus Status,
|
|
|
|
|
string? TableNumber,
|
|
|
|
|
OrderType OrderType,
|
|
|
|
|
decimal Total,
|
|
|
|
|
DateTime CreatedAt,
|
2026-06-03 02:42:29 +03:30
|
|
|
IReadOnlyList<OrderItemDto> Items,
|
|
|
|
|
OrderSource Source);
|