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

namespace MiningService.API.Application.Validations;

/// <summary>
/// EN: Validator for ResetMinerStreakCommand.
/// VI: Validator cho ResetMinerStreakCommand.
/// </summary>
public class ResetMinerStreakCommandValidator : AbstractValidator<ResetMinerStreakCommand>
{
    public ResetMinerStreakCommandValidator()
    {
        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ự");
    }
}
