App:新增 operation_logs/quota_packages/tenant_payments/tenant_quota_package_purchases 表 Identity:修正 Avatar 字段类型(varchar(256)->text),保持现有数据不变
46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
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>();
|
|
}
|