42 lines
1.0 KiB
C#
42 lines
1.0 KiB
C#
|
|
using Meezi.Core.Enums;
|
||
|
|
|
||
|
|
namespace Meezi.Core.Delivery;
|
||
|
|
|
||
|
|
public record UnifiedDeliveryCustomer(
|
||
|
|
string Name,
|
||
|
|
string Phone,
|
||
|
|
string? Address = null,
|
||
|
|
double? Lat = null,
|
||
|
|
double? Lng = null);
|
||
|
|
|
||
|
|
public record UnifiedDeliveryItem(
|
||
|
|
string Sku,
|
||
|
|
string Name,
|
||
|
|
int Quantity,
|
||
|
|
decimal UnitPrice,
|
||
|
|
string? Notes = null);
|
||
|
|
|
||
|
|
public record UnifiedDeliveryPayment(
|
||
|
|
decimal Total,
|
||
|
|
string Method,
|
||
|
|
bool IsPaid,
|
||
|
|
decimal? Commission = null);
|
||
|
|
|
||
|
|
public record UnifiedDeliveryInfo(
|
||
|
|
string Type,
|
||
|
|
int? EstimatedMinutes = null,
|
||
|
|
string? DriverName = null,
|
||
|
|
string? DriverPhone = null);
|
||
|
|
|
||
|
|
/// <summary>Normalized inbound order from Snappfood, Tap30, or other delivery webhooks.</summary>
|
||
|
|
public record UnifiedDeliveryOrder(
|
||
|
|
string ExternalId,
|
||
|
|
DeliveryPlatform Platform,
|
||
|
|
string VendorId,
|
||
|
|
DateTime CreatedAt,
|
||
|
|
UnifiedDeliveryCustomer Customer,
|
||
|
|
IReadOnlyList<UnifiedDeliveryItem> Items,
|
||
|
|
UnifiedDeliveryPayment Payment,
|
||
|
|
UnifiedDeliveryInfo Delivery,
|
||
|
|
UnifiedDeliveryStatus Status);
|