style: 命令不可变化与规范补充

This commit is contained in:
2025-12-02 12:09:46 +08:00
parent 3e01943727
commit 541b75ecd8
13 changed files with 217 additions and 186 deletions

View File

@@ -7,100 +7,100 @@ namespace TakeoutSaaS.Application.App.Stores.Commands;
/// <summary>
/// 更新门店命令。
/// </summary>
public sealed class UpdateStoreCommand : IRequest<StoreDto?>
public sealed record UpdateStoreCommand : IRequest<StoreDto?>
{
/// <summary>
/// 门店 ID。
/// </summary>
public long StoreId { get; set; }
public long StoreId { get; init; }
/// <summary>
/// 商户 ID。
/// </summary>
public long MerchantId { get; set; }
public long MerchantId { get; init; }
/// <summary>
/// 门店编码。
/// </summary>
public string Code { get; set; } = string.Empty;
public string Code { get; init; } = string.Empty;
/// <summary>
/// 门店名称。
/// </summary>
public string Name { get; set; } = string.Empty;
public string Name { get; init; } = string.Empty;
/// <summary>
/// 电话。
/// </summary>
public string? Phone { get; set; }
public string? Phone { get; init; }
/// <summary>
/// 负责人。
/// </summary>
public string? ManagerName { get; set; }
public string? ManagerName { get; init; }
/// <summary>
/// 状态。
/// </summary>
public StoreStatus Status { get; set; } = StoreStatus.Closed;
public StoreStatus Status { get; init; } = StoreStatus.Closed;
/// <summary>
/// 省份。
/// </summary>
public string? Province { get; set; }
public string? Province { get; init; }
/// <summary>
/// 城市。
/// </summary>
public string? City { get; set; }
public string? City { get; init; }
/// <summary>
/// 区县。
/// </summary>
public string? District { get; set; }
public string? District { get; init; }
/// <summary>
/// 详细地址。
/// </summary>
public string? Address { get; set; }
public string? Address { get; init; }
/// <summary>
/// 经度。
/// </summary>
public double? Longitude { get; set; }
public double? Longitude { get; init; }
/// <summary>
/// 纬度。
/// </summary>
public double? Latitude { get; set; }
public double? Latitude { get; init; }
/// <summary>
/// 公告。
/// </summary>
public string? Announcement { get; set; }
public string? Announcement { get; init; }
/// <summary>
/// 标签。
/// </summary>
public string? Tags { get; set; }
public string? Tags { get; init; }
/// <summary>
/// 配送半径。
/// </summary>
public decimal DeliveryRadiusKm { get; set; }
public decimal DeliveryRadiusKm { get; init; }
/// <summary>
/// 支持堂食。
/// </summary>
public bool SupportsDineIn { get; set; } = true;
public bool SupportsDineIn { get; init; } = true;
/// <summary>
/// 支持自提。
/// </summary>
public bool SupportsPickup { get; set; } = true;
public bool SupportsPickup { get; init; } = true;
/// <summary>
/// 支持配送。
/// </summary>
public bool SupportsDelivery { get; set; } = true;
public bool SupportsDelivery { get; init; } = true;
}