using FluentValidation;
using PARR.API.Contracts.V1.Requests;
using PARR.Domain.Enums;

namespace PARR.API.Validators
{
    public class RobotHistoryRequestValidator : AbstractValidator<RobotHistoryRequest>
    {
        public RobotHistoryRequestValidator()
        {
            RuleFor(r => r.HistoryLevel)
                .Must(t => t == RobotHistoryLevelEnum.Information || t == RobotHistoryLevelEnum.Error)
                .WithMessage($"Допустимые значения: {(int)RobotHistoryLevelEnum.Information}, {(int)RobotHistoryLevelEnum.Error}");

            RuleFor(r => r.TaskId).NotNull().NotEmpty();
        }
    }
}
