using MediatR;
using System.ComponentModel.DataAnnotations;
using TakeoutSaaS.Application.App.Subscriptions.Dto;
using TakeoutSaaS.Domain.Tenants.Enums;

namespace TakeoutSaaS.Application.App.Subscriptions.Commands;

/// <summary>
/// 更新订阅状态命令。
/// </summary>
public sealed record UpdateSubscriptionStatusCommand : IRequest<SubscriptionDetailDto?>
{
    /// <summary>
    /// 订阅 ID（从路由参数绑定）。
    /// </summary>
    [Required]
    public long SubscriptionId { get; init; }

    /// <summary>
    /// 目标状态。
    /// </summary>
    [Required]
    public SubscriptionStatus Status { get; init; }

    /// <summary>
    /// 备注信息。
    /// </summary>
    [MaxLength(500)]
    public string? Notes { get; init; }
}
