refactor: 清理租户API旧模块代码
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
using TakeoutSaaS.Domain.Tenants.Enums;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Tenants.Dto;
|
||||
|
||||
/// <summary>
|
||||
/// 配额校验结果。
|
||||
/// </summary>
|
||||
public sealed class QuotaCheckResultDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 配额类型。
|
||||
/// </summary>
|
||||
public TenantQuotaType QuotaType { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前配额上限,null 表示无限制。
|
||||
/// </summary>
|
||||
public decimal? Limit { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 已使用数量。
|
||||
/// </summary>
|
||||
public decimal Used { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 剩余额度,null 表示无限制。
|
||||
/// </summary>
|
||||
public decimal? Remaining { get; init; }
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
using TakeoutSaaS.Domain.Tenants.Enums;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Tenants.Dto;
|
||||
|
||||
/// <summary>
|
||||
/// 租户配额使用历史 DTO。
|
||||
/// </summary>
|
||||
public sealed record QuotaUsageHistoryDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 配额类型。
|
||||
/// </summary>
|
||||
public TenantQuotaType QuotaType { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 已使用值。
|
||||
/// </summary>
|
||||
public decimal UsedValue { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 限额值。
|
||||
/// </summary>
|
||||
public decimal LimitValue { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 记录时间(UTC)。
|
||||
/// </summary>
|
||||
public DateTime RecordedAt { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 变更类型:increase | decrease | init | snapshot。
|
||||
/// </summary>
|
||||
public string ChangeType { get; init; } = "snapshot";
|
||||
|
||||
/// <summary>
|
||||
/// 变更量(可选)。
|
||||
/// </summary>
|
||||
public decimal? ChangeAmount { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 变更原因(可选)。
|
||||
/// </summary>
|
||||
public string? ChangeReason { get; init; }
|
||||
}
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using TakeoutSaaS.Domain.Tenants.Enums;
|
||||
using TakeoutSaaS.Shared.Abstractions.Serialization;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Tenants.Dto;
|
||||
|
||||
/// <summary>
|
||||
/// 自助注册结果 DTO。
|
||||
/// </summary>
|
||||
public sealed class SelfRegisterResultDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 租户 ID。
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
|
||||
public long TenantId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户编码。
|
||||
/// </summary>
|
||||
public string Code { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 初始状态。
|
||||
/// </summary>
|
||||
public TenantStatus Status { get; init; } = TenantStatus.PendingReview;
|
||||
|
||||
/// <summary>
|
||||
/// 当前实名状态。
|
||||
/// </summary>
|
||||
public TenantVerificationStatus VerificationStatus { get; init; } = TenantVerificationStatus.Draft;
|
||||
|
||||
/// <summary>
|
||||
/// 订阅开始时间。
|
||||
/// </summary>
|
||||
public DateTime? EffectiveFrom { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 订阅到期时间。
|
||||
/// </summary>
|
||||
public DateTime? EffectiveTo { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 初始管理员账号。
|
||||
/// </summary>
|
||||
public string AdminAccount { get; init; } = string.Empty;
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using TakeoutSaaS.Domain.Tenants.Enums;
|
||||
using TakeoutSaaS.Shared.Abstractions.Serialization;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Tenants.Dto;
|
||||
|
||||
/// <summary>
|
||||
/// 租户公告 DTO。
|
||||
/// </summary>
|
||||
public sealed class TenantAnnouncementDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 公告 ID(雪花算法,序列化为字符串)。
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
|
||||
public long Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户 ID(雪花算法,序列化为字符串)。
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
|
||||
public long TenantId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 公告标题。
|
||||
/// </summary>
|
||||
public string Title { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 公告正文内容。
|
||||
/// </summary>
|
||||
public string Content { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 公告类型。
|
||||
/// </summary>
|
||||
public TenantAnnouncementType AnnouncementType { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 优先级,数值越大越靠前。
|
||||
/// </summary>
|
||||
public int Priority { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 生效开始时间(UTC)。
|
||||
/// </summary>
|
||||
public DateTime EffectiveFrom { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 生效结束时间(UTC),为空则长期有效。
|
||||
/// </summary>
|
||||
public DateTime? EffectiveTo { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 发布者范围。
|
||||
/// </summary>
|
||||
public PublisherScope PublisherScope { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 发布者用户 ID。
|
||||
/// </summary>
|
||||
public long? PublisherUserId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 公告状态。
|
||||
/// </summary>
|
||||
public AnnouncementStatus Status { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 实际发布时间(UTC)。
|
||||
/// </summary>
|
||||
public DateTime? PublishedAt { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 撤销时间(UTC)。
|
||||
/// </summary>
|
||||
public DateTime? RevokedAt { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 预定发布时间(UTC)。
|
||||
/// </summary>
|
||||
public DateTime? ScheduledPublishAt { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 目标受众类型。
|
||||
/// </summary>
|
||||
public string TargetType { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 目标受众参数(JSON)。
|
||||
/// </summary>
|
||||
public string? TargetParameters { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 并发控制版本。
|
||||
/// </summary>
|
||||
public byte[] RowVersion { get; init; } = Array.Empty<byte>();
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用(迁移期保留)。
|
||||
/// </summary>
|
||||
public bool IsActive { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前用户是否已读。
|
||||
/// </summary>
|
||||
public bool IsRead { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 已读时间(UTC)。
|
||||
/// </summary>
|
||||
public DateTime? ReadAt { get; init; }
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using TakeoutSaaS.Domain.Tenants.Enums;
|
||||
using TakeoutSaaS.Shared.Abstractions.Serialization;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Tenants.Dto;
|
||||
|
||||
/// <summary>
|
||||
/// 租户账单 DTO。
|
||||
/// </summary>
|
||||
public sealed class TenantBillingDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 账单 ID(雪花算法,序列化为字符串)。
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
|
||||
public long Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户 ID(雪花算法,序列化为字符串)。
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
|
||||
public long TenantId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 账单编号。
|
||||
/// </summary>
|
||||
public string StatementNo { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 计费周期开始时间(UTC)。
|
||||
/// </summary>
|
||||
public DateTime PeriodStart { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 计费周期结束时间(UTC)。
|
||||
/// </summary>
|
||||
public DateTime PeriodEnd { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 应付金额。
|
||||
/// </summary>
|
||||
public decimal AmountDue { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 已付金额。
|
||||
/// </summary>
|
||||
public decimal AmountPaid { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 账单状态。
|
||||
/// </summary>
|
||||
public TenantBillingStatus Status { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 到期日(UTC)。
|
||||
/// </summary>
|
||||
public DateTime DueDate { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 账单明细 JSON。
|
||||
/// </summary>
|
||||
public string? LineItemsJson { get; init; }
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using TakeoutSaaS.Domain.Tenants.Enums;
|
||||
using TakeoutSaaS.Shared.Abstractions.Serialization;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Tenants.Dto;
|
||||
|
||||
/// <summary>
|
||||
/// 租户通知 DTO。
|
||||
/// </summary>
|
||||
public sealed class TenantNotificationDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 通知 ID(雪花算法,序列化为字符串)。
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
|
||||
public long Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户 ID(雪花算法,序列化为字符串)。
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
|
||||
public long TenantId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 通知标题。
|
||||
/// </summary>
|
||||
public string Title { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 通知内容。
|
||||
/// </summary>
|
||||
public string Message { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 通道类型(如站内信、短信、邮件)。
|
||||
/// </summary>
|
||||
public TenantNotificationChannel Channel { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 通知等级。
|
||||
/// </summary>
|
||||
public TenantNotificationSeverity Severity { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 发送时间(UTC)。
|
||||
/// </summary>
|
||||
public DateTime SentAt { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 阅读时间(UTC)。
|
||||
/// </summary>
|
||||
public DateTime? ReadAt { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 附加元数据 JSON。
|
||||
/// </summary>
|
||||
public string? MetadataJson { get; init; }
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using TakeoutSaaS.Domain.Tenants.Enums;
|
||||
using TakeoutSaaS.Shared.Abstractions.Serialization;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Tenants.Dto;
|
||||
|
||||
/// <summary>
|
||||
/// 租户套餐 DTO。
|
||||
/// </summary>
|
||||
public sealed class TenantPackageDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 套餐 ID。
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
|
||||
public long Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 套餐名称。
|
||||
/// </summary>
|
||||
public string Name { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 描述。
|
||||
/// </summary>
|
||||
public string? Description { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 套餐类型。
|
||||
/// </summary>
|
||||
public TenantPackageType PackageType { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 月付价格。
|
||||
/// </summary>
|
||||
public decimal? MonthlyPrice { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 年付价格。
|
||||
/// </summary>
|
||||
public decimal? YearlyPrice { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 最大门店数。
|
||||
/// </summary>
|
||||
public int? MaxStoreCount { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 最大账号数。
|
||||
/// </summary>
|
||||
public int? MaxAccountCount { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 存储上限(GB)。
|
||||
/// </summary>
|
||||
public int? MaxStorageGb { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 短信额度。
|
||||
/// </summary>
|
||||
public int? MaxSmsCredits { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 配送单上限。
|
||||
/// </summary>
|
||||
public int? MaxDeliveryOrders { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 权益明细 JSON。
|
||||
/// </summary>
|
||||
public string? FeaturePoliciesJson { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否仍启用(系统控制)。
|
||||
/// </summary>
|
||||
public bool IsActive { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否对外可见。
|
||||
/// </summary>
|
||||
public bool IsPublicVisible { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否允许新租户购买/选择。
|
||||
/// </summary>
|
||||
public bool IsAllowNewTenantPurchase { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 发布状态。
|
||||
/// </summary>
|
||||
public TenantPackagePublishStatus PublishStatus { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否推荐展示(运营推荐标识)。
|
||||
/// </summary>
|
||||
public bool IsRecommended { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 套餐标签(用于展示与对比页)。
|
||||
/// </summary>
|
||||
public string[] Tags { get; init; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// 展示排序,数值越小越靠前。
|
||||
/// </summary>
|
||||
public int SortOrder { get; init; }
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using TakeoutSaaS.Domain.Tenants.Enums;
|
||||
using TakeoutSaaS.Shared.Abstractions.Serialization;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Tenants.Dto;
|
||||
|
||||
/// <summary>
|
||||
/// 租户入住进度 DTO。
|
||||
/// </summary>
|
||||
public sealed class TenantProgressDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 租户 ID。
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
|
||||
public long TenantId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户编码。
|
||||
/// </summary>
|
||||
public string Code { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 当前租户状态。
|
||||
/// </summary>
|
||||
public TenantStatus Status { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 实名审核状态。
|
||||
/// </summary>
|
||||
public TenantVerificationStatus VerificationStatus { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前订阅开始时间。
|
||||
/// </summary>
|
||||
public DateTime? EffectiveFrom { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前订阅到期时间。
|
||||
/// </summary>
|
||||
public DateTime? EffectiveTo { get; init; }
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using TakeoutSaaS.Domain.Tenants.Enums;
|
||||
using TakeoutSaaS.Shared.Abstractions.Serialization;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Tenants.Dto;
|
||||
|
||||
/// <summary>
|
||||
/// 租户实名认证 DTO。
|
||||
/// </summary>
|
||||
public sealed class TenantVerificationDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键。
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
|
||||
public long Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 租户标识。
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
|
||||
public long TenantId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态。
|
||||
/// </summary>
|
||||
public TenantVerificationStatus Status { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 营业执照号。
|
||||
/// </summary>
|
||||
public string? BusinessLicenseNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 营业执照图片。
|
||||
/// </summary>
|
||||
public string? BusinessLicenseUrl { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 法人姓名。
|
||||
/// </summary>
|
||||
public string? LegalPersonName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 法人身份证号。
|
||||
/// </summary>
|
||||
public string? LegalPersonIdNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 法人身份证正面。
|
||||
/// </summary>
|
||||
public string? LegalPersonIdFrontUrl { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 法人身份证反面。
|
||||
/// </summary>
|
||||
public string? LegalPersonIdBackUrl { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 开户名。
|
||||
/// </summary>
|
||||
public string? BankAccountName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 银行账号。
|
||||
/// </summary>
|
||||
public string? BankAccountNumber { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 银行名称。
|
||||
/// </summary>
|
||||
public string? BankName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 附加资料(JSON)。
|
||||
/// </summary>
|
||||
public string? AdditionalDataJson { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 提交时间。
|
||||
/// </summary>
|
||||
public DateTime? SubmittedAt { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核人 ID。
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(NullableSnowflakeIdJsonConverter))]
|
||||
public long? ReviewedBy { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核备注。
|
||||
/// </summary>
|
||||
public string? ReviewRemarks { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 最新审核人。
|
||||
/// </summary>
|
||||
public string? ReviewedByName { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核时间。
|
||||
/// </summary>
|
||||
public DateTime? ReviewedAt { get; init; }
|
||||
}
|
||||
Reference in New Issue
Block a user