Files
TakeoutSaaS.AdminApi/src/Application/TakeoutSaaS.Application/App/Deliveries/Commands/UpdateDeliveryOrderCommand.cs

72 lines
1.6 KiB
C#

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