feat:商户管理

This commit is contained in:
2025-12-29 16:40:27 +08:00
parent 57f4c2d394
commit dd91c1010a
62 changed files with 10536 additions and 165 deletions

View File

@@ -1,3 +1,8 @@
using System.Text.Json.Serialization;
using TakeoutSaaS.Domain.Common.Enums;
using TakeoutSaaS.Domain.Merchants.Enums;
using TakeoutSaaS.Shared.Abstractions.Serialization;
namespace TakeoutSaaS.Application.App.Merchants.Dto;
/// <summary>
@@ -6,17 +11,117 @@ namespace TakeoutSaaS.Application.App.Merchants.Dto;
public sealed class MerchantDetailDto
{
/// <summary>
/// 基础信息
/// 商户 ID
/// </summary>
public MerchantDto Merchant { get; init; } = new();
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long Id { get; init; }
/// <summary>
/// 证照列表
/// 租户 ID
/// </summary>
public IReadOnlyList<MerchantDocumentDto> Documents { get; init; } = [];
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long TenantId { get; init; }
/// <summary>
/// 合同列表
/// 租户名称
/// </summary>
public IReadOnlyList<MerchantContractDto> Contracts { get; init; } = [];
public string? TenantName { get; init; }
/// <summary>
/// 商户名称。
/// </summary>
public string Name { get; init; } = string.Empty;
/// <summary>
/// 经营模式。
/// </summary>
public OperatingMode? OperatingMode { get; init; }
/// <summary>
/// 营业执照号。
/// </summary>
public string? LicenseNumber { get; init; }
/// <summary>
/// 法人或负责人。
/// </summary>
public string? LegalRepresentative { get; init; }
/// <summary>
/// 注册地址。
/// </summary>
public string? RegisteredAddress { get; init; }
/// <summary>
/// 联系电话。
/// </summary>
public string? ContactPhone { get; init; }
/// <summary>
/// 联系邮箱。
/// </summary>
public string? ContactEmail { get; init; }
/// <summary>
/// 审核状态。
/// </summary>
public MerchantStatus Status { get; init; }
/// <summary>
/// 业务冻结标记。
/// </summary>
public bool IsFrozen { get; init; }
/// <summary>
/// 冻结原因。
/// </summary>
public string? FrozenReason { get; init; }
/// <summary>
/// 冻结时间。
/// </summary>
public DateTime? FrozenAt { get; init; }
/// <summary>
/// 审核通过人。
/// </summary>
[JsonConverter(typeof(NullableSnowflakeIdJsonConverter))]
public long? ApprovedBy { get; init; }
/// <summary>
/// 审核通过时间。
/// </summary>
public DateTime? ApprovedAt { get; init; }
/// <summary>
/// 门店列表。
/// </summary>
public IReadOnlyList<StoreDto> Stores { get; init; } = [];
/// <summary>
/// 并发控制版本。
/// </summary>
public byte[] RowVersion { get; init; } = Array.Empty<byte>();
/// <summary>
/// 创建时间。
/// </summary>
public DateTime CreatedAt { get; init; }
/// <summary>
/// 创建人。
/// </summary>
[JsonConverter(typeof(NullableSnowflakeIdJsonConverter))]
public long? CreatedBy { get; init; }
/// <summary>
/// 更新时间。
/// </summary>
public DateTime? UpdatedAt { get; init; }
/// <summary>
/// 更新人。
/// </summary>
[JsonConverter(typeof(NullableSnowflakeIdJsonConverter))]
public long? UpdatedBy { get; init; }
}