using System.ComponentModel.DataAnnotations;
namespace TakeoutSaaS.Module.Scheduler.Options;
///
/// 订阅自动化相关配置(续费提醒、自动续费、宽限期处理)。
///
public sealed class SubscriptionAutomationOptions
{
///
/// 自动续费任务执行小时(UTC)。
///
[Range(0, 23)]
public int AutoRenewalExecuteHourUtc { get; set; } = 1;
///
/// 自动续费:到期前 N 天生成续费账单。
///
[Range(0, 365)]
public int AutoRenewalDaysBeforeExpiry { get; set; } = 3;
///
/// 续费提醒任务执行小时(UTC)。
///
[Range(0, 23)]
public int RenewalReminderExecuteHourUtc { get; set; } = 10;
///
/// 续费提醒:到期前 N 天发送提醒。
///
[MinLength(1)]
public int[] ReminderDaysBeforeExpiry { get; set; } = [7, 3, 1];
///
/// 订阅到期检查任务执行小时(UTC)。
///
[Range(0, 23)]
public int SubscriptionExpiryCheckExecuteHourUtc { get; set; } = 2;
///
/// 宽限期天数。
///
[Range(0, 365)]
public int GracePeriodDays { get; set; } = 7;
}