feat: 手动创建租户支持可选审核,新增审核通过/驳回接口

- CreateTenantManuallyCommand 添加 IsSkipApproval 字段
- 根据 IsSkipApproval 自动设置租户状态和认证状态
- 新增 ApproveTenantCommand/Handler 审核通过逻辑
- 新增 RejectTenantCommand/Handler 审核驳回逻辑
- TenantsController 添加 PUT /approve 和 PUT /reject 接口

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
MSuMshk
2026-02-02 19:59:03 +08:00
parent 59bc3005af
commit a586407e60
7 changed files with 268 additions and 12 deletions

View File

@@ -112,6 +112,15 @@ public sealed record CreateTenantManuallyCommand : IRequest<TenantDetailDto>
/// </summary>
public TenantStatus TenantStatus { get; init; } = TenantStatus.Active;
/// <summary>
/// 是否跳过审核(直接激活)。
/// </summary>
/// <remarks>
/// true租户状态设为 Active认证状态设为 Approved默认
/// false租户状态设为 PendingReview认证状态设为 Pending需后续审核。
/// </remarks>
public bool IsSkipApproval { get; init; } = true;
// 2. 订阅信息public.tenant_subscriptions
/// <summary>