using FluentValidation;
using AdsManagerService.API.Controllers;

namespace AdsManagerService.API.Application.Validations;

/// <summary>
/// EN: Validator for RejectAdCommand.
/// VI: Validator cho RejectAdCommand.
/// </summary>
public class RejectAdCommandValidator : AbstractValidator<RejectAdCommand>
{
    public RejectAdCommandValidator()
    {
        RuleFor(x => x.AdId)
            .NotEmpty()
            .WithMessage("Ad ID is required / Ad ID là bắt buộc");

        RuleFor(x => x.Reason)
            .NotEmpty()
            .WithMessage("Rejection reason is required / Lý do từ chối là bắt buộc")
            .MaximumLength(1000)
            .WithMessage("Rejection reason max 1000 characters / Lý do từ chối tối đa 1000 ký tự");
    }
}
