using FluentValidation;
using TakeoutSaaS.Application.App.SystemParameters.Queries;
namespace TakeoutSaaS.Application.App.SystemParameters.Validators;
///
/// 系统参数列表查询验证器。
///
public sealed class SearchSystemParametersQueryValidator : AbstractValidator
{
///
/// 初始化验证规则。
///
public SearchSystemParametersQueryValidator()
{
RuleFor(x => x.Page).GreaterThan(0);
RuleFor(x => x.PageSize).InclusiveBetween(1, 200);
RuleFor(x => x.Keyword).MaximumLength(256);
RuleFor(x => x.SortBy).MaximumLength(64);
}
}