using MediatR;
using TakeoutSaaS.Application.App.Deliveries.Dto;
using TakeoutSaaS.Domain.Deliveries.Enums;
namespace TakeoutSaaS.Application.App.Deliveries.Commands;
///
/// 更新配送单命令。
///
public sealed record UpdateDeliveryOrderCommand : IRequest
{
///
/// 配送单 ID。
///
public long DeliveryOrderId { get; init; }
///
/// 订单 ID。
///
public long OrderId { get; init; }
///
/// 服务商。
///
public DeliveryProvider Provider { get; init; } = DeliveryProvider.InHouse;
///
/// 第三方单号。
///
public string? ProviderOrderId { get; init; }
///
/// 状态。
///
public DeliveryStatus Status { get; init; } = DeliveryStatus.Pending;
///
/// 配送费。
///
public decimal? DeliveryFee { get; init; }
///
/// 骑手姓名。
///
public string? CourierName { get; init; }
///
/// 骑手电话。
///
public string? CourierPhone { get; init; }
///
/// 下发时间。
///
public DateTime? DispatchedAt { get; init; }
///
/// 取餐时间。
///
public DateTime? PickedUpAt { get; init; }
///
/// 完成时间。
///
public DateTime? DeliveredAt { get; init; }
///
/// 异常原因。
///
public string? FailureReason { get; init; }
}