feat: 新增配额包/支付相关实体与迁移

App:新增 operation_logs/quota_packages/tenant_payments/tenant_quota_package_purchases 表

Identity:修正 Avatar 字段类型(varchar(256)->text),保持现有数据不变
This commit is contained in:
2025-12-17 17:27:45 +08:00
parent 9c28790f5e
commit ab59e2e3e2
103 changed files with 14450 additions and 4 deletions

View File

@@ -0,0 +1,45 @@
using MediatR;
using System.ComponentModel.DataAnnotations;
namespace TakeoutSaaS.Application.App.Subscriptions.Commands;
/// <summary>
/// 批量发送续费提醒命令。
/// </summary>
public sealed record BatchSendReminderCommand : IRequest<BatchSendReminderResult>
{
/// <summary>
/// 订阅ID列表。
/// </summary>
[Required]
[MinLength(1, ErrorMessage = "至少需要选择一个订阅")]
public IReadOnlyList<long> SubscriptionIds { get; init; } = Array.Empty<long>();
/// <summary>
/// 提醒内容。
/// </summary>
[Required(ErrorMessage = "提醒内容不能为空")]
[MaxLength(1000, ErrorMessage = "提醒内容不能超过1000字符")]
public string ReminderContent { get; init; } = string.Empty;
}
/// <summary>
/// 批量发送提醒结果。
/// </summary>
public record BatchSendReminderResult
{
/// <summary>
/// 成功发送数量。
/// </summary>
public int SuccessCount { get; init; }
/// <summary>
/// 发送失败数量。
/// </summary>
public int FailureCount { get; init; }
/// <summary>
/// 失败详情列表。
/// </summary>
public IReadOnlyList<BatchFailureItem> Failures { get; init; } = Array.Empty<BatchFailureItem>();
}