Files
TakeoutSaaS.TenantApi/src/Application/TakeoutSaaS.Application/App/Stores/Commands/UpdateStoreCommand.cs
MSuMshk b3429e2a0d
All checks were successful
Build and Deploy TenantApi / build-and-deploy (push) Successful in 44s
feat(store): auto-generate store code on create and make update code optional
2026-02-18 08:27:37 +08:00

61 lines
1.5 KiB
C#

using MediatR;
using System.Text.Json.Serialization;
using TakeoutSaaS.Application.App.Stores.Enums;
using TakeoutSaaS.Domain.Stores.Enums;
using TakeoutSaaS.Shared.Abstractions.Serialization;
namespace TakeoutSaaS.Application.App.Stores.Commands;
/// <summary>
/// 租户端更新门店命令。
/// </summary>
public sealed record UpdateStoreCommand : IRequest
{
/// <summary>
/// 门店 ID。
/// </summary>
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long Id { get; init; }
/// <summary>
/// 门店名称。
/// </summary>
public string Name { get; init; } = string.Empty;
/// <summary>
/// 门店编码(可选,未传时保持原值)。
/// </summary>
public string? Code { get; init; }
/// <summary>
/// 联系电话。
/// </summary>
public string ContactPhone { get; init; } = string.Empty;
/// <summary>
/// 负责人。
/// </summary>
public string ManagerName { get; init; } = string.Empty;
/// <summary>
/// 门店地址。
/// </summary>
public string Address { get; init; } = string.Empty;
/// <summary>
/// 门店封面图。
/// </summary>
public string? CoverImage { get; init; }
/// <summary>
/// 营业状态。
/// </summary>
public StoreBusinessStatus? BusinessStatus { get; init; }
/// <summary>
/// 服务方式。
/// </summary>
public IReadOnlyList<ServiceType>? ServiceTypes { get; init; }
}