using AsbCloudApp.Data;
using FluentValidation;

namespace AsbCloudInfrastructure.Validators
{
    public class DrillFlowChartDtoValidator : AbstractValidator<DrillFlowChartDto>
    {
        public DrillFlowChartDtoValidator()
        {
            RuleFor(x => x.IdWell).GreaterThan(0)
                .WithMessage("Id скважины не может быть меньше 1");
            RuleFor(x => x.IdWellOperationCategory).GreaterThan(0)
                .WithMessage("Id категории операции не может быть меньше 1");
            RuleFor(x => x.DepthStart).GreaterThan(-1)
                .WithMessage("Глубина не может быть отрицательной");
            RuleFor(x => x.DepthEnd).GreaterThan(-1)
                .WithMessage("Глубина не может быть отрицательной");
        }
    }
}