feat(api): .NET 10 multi-tenant REST API
Full backend implementation: - Multi-tenant cafe/restaurant management (menus, orders, tables, staff) - POS order flow with ZarinPal and Snappfood payment integration - OTP authentication via Kavenegar SMS - QR digital menu with public discover/finder endpoints - Customer loyalty, coupons, CRM - PostgreSQL via EF Core, Redis for caching/sessions - Background jobs, webhook handlers - Full migration history Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,81 @@
|
||||
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);
|
||||
|
||||
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,
|
||||
IReadOnlyList<OrderItemDto> Items);
|
||||
Reference in New Issue
Block a user