using FluentValidation;
using TakeoutSaaS.Application.App.StoreAudits.Commands;

namespace TakeoutSaaS.Application.App.StoreAudits.Validators;

/// <summary>
/// 审核驳回命令验证器。
/// </summary>
public sealed class RejectStoreCommandValidator : AbstractValidator<RejectStoreCommand>
{
    /// <summary>
    /// 初始化验证规则。
    /// </summary>
    public RejectStoreCommandValidator()
    {
        RuleFor(x => x.StoreId).GreaterThan(0);
        RuleFor(x => x.RejectionReasonId).GreaterThan(0);
        RuleFor(x => x.RejectionReasonText).MaximumLength(500);
        RuleFor(x => x.Remark).MaximumLength(500);
    }
}
