style: 命令不可变化与规范补充
This commit is contained in:
@@ -8,110 +8,110 @@ namespace TakeoutSaaS.Application.App.Orders.Commands;
|
||||
/// <summary>
|
||||
/// 更新订单命令。
|
||||
/// </summary>
|
||||
public sealed class UpdateOrderCommand : IRequest<OrderDto?>
|
||||
public sealed record UpdateOrderCommand : IRequest<OrderDto?>
|
||||
{
|
||||
/// <summary>
|
||||
/// 订单 ID。
|
||||
/// </summary>
|
||||
public long OrderId { get; set; }
|
||||
public long OrderId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 订单号。
|
||||
/// </summary>
|
||||
public string OrderNo { get; set; } = string.Empty;
|
||||
public string OrderNo { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 门店 ID。
|
||||
/// </summary>
|
||||
public long StoreId { get; set; }
|
||||
public long StoreId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 渠道。
|
||||
/// </summary>
|
||||
public OrderChannel Channel { get; set; } = OrderChannel.MiniProgram;
|
||||
public OrderChannel Channel { get; init; } = OrderChannel.MiniProgram;
|
||||
|
||||
/// <summary>
|
||||
/// 履约方式。
|
||||
/// </summary>
|
||||
public DeliveryType DeliveryType { get; set; } = DeliveryType.DineIn;
|
||||
public DeliveryType DeliveryType { get; init; } = DeliveryType.DineIn;
|
||||
|
||||
/// <summary>
|
||||
/// 状态。
|
||||
/// </summary>
|
||||
public OrderStatus Status { get; set; } = OrderStatus.PendingPayment;
|
||||
public OrderStatus Status { get; init; } = OrderStatus.PendingPayment;
|
||||
|
||||
/// <summary>
|
||||
/// 支付状态。
|
||||
/// </summary>
|
||||
public PaymentStatus PaymentStatus { get; set; } = PaymentStatus.Unpaid;
|
||||
public PaymentStatus PaymentStatus { get; init; } = PaymentStatus.Unpaid;
|
||||
|
||||
/// <summary>
|
||||
/// 顾客姓名。
|
||||
/// </summary>
|
||||
public string? CustomerName { get; set; }
|
||||
public string? CustomerName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 顾客手机号。
|
||||
/// </summary>
|
||||
public string? CustomerPhone { get; set; }
|
||||
public string? CustomerPhone { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 桌号。
|
||||
/// </summary>
|
||||
public string? TableNo { get; set; }
|
||||
public string? TableNo { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 排队号。
|
||||
/// </summary>
|
||||
public string? QueueNumber { get; set; }
|
||||
public string? QueueNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 预约 ID。
|
||||
/// </summary>
|
||||
public long? ReservationId { get; set; }
|
||||
public long? ReservationId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 商品金额。
|
||||
/// </summary>
|
||||
public decimal ItemsAmount { get; set; }
|
||||
public decimal ItemsAmount { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 优惠金额。
|
||||
/// </summary>
|
||||
public decimal DiscountAmount { get; set; }
|
||||
public decimal DiscountAmount { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 应付金额。
|
||||
/// </summary>
|
||||
public decimal PayableAmount { get; set; }
|
||||
public decimal PayableAmount { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 实付金额。
|
||||
/// </summary>
|
||||
public decimal PaidAmount { get; set; }
|
||||
public decimal PaidAmount { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付时间。
|
||||
/// </summary>
|
||||
public DateTime? PaidAt { get; set; }
|
||||
public DateTime? PaidAt { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 完成时间。
|
||||
/// </summary>
|
||||
public DateTime? FinishedAt { get; set; }
|
||||
public DateTime? FinishedAt { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 取消时间。
|
||||
/// </summary>
|
||||
public DateTime? CancelledAt { get; set; }
|
||||
public DateTime? CancelledAt { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 取消原因。
|
||||
/// </summary>
|
||||
public string? CancelReason { get; set; }
|
||||
public string? CancelReason { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注。
|
||||
/// </summary>
|
||||
public string? Remark { get; set; }
|
||||
public string? Remark { get; init; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user