using FluentValidation;
using MiningService.API.Application.Commands;

namespace MiningService.API.Application.Validations;

/// <summary>
/// EN: Validator for BanMinerCommand.
/// VI: Validator cho BanMinerCommand.
/// </summary>
public class BanMinerCommandValidator : AbstractValidator<BanMinerCommand>
{
    public BanMinerCommandValidator()
    {
        RuleFor(x => x.MinerId)
            .NotEmpty().WithMessage("Miner ID is required / ID thợ đào là bắt buộc");

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