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