feat: tenants 列表支持名称/联系人/电话/认证状态过滤
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
using FluentValidation;
|
||||
using TakeoutSaaS.Application.App.Tenants.Queries;
|
||||
|
||||
namespace TakeoutSaaS.Application.App.Tenants.Validators;
|
||||
|
||||
/// <summary>
|
||||
/// 租户列表查询验证器。
|
||||
/// </summary>
|
||||
public sealed class SearchTenantsQueryValidator : AbstractValidator<SearchTenantsQuery>
|
||||
{
|
||||
/// <summary>
|
||||
/// 初始化验证规则。
|
||||
/// </summary>
|
||||
public SearchTenantsQueryValidator()
|
||||
{
|
||||
RuleFor(x => x.Page).GreaterThan(0);
|
||||
RuleFor(x => x.PageSize).InclusiveBetween(1, 200);
|
||||
RuleFor(x => x.Keyword).MaximumLength(128);
|
||||
RuleFor(x => x.Name).MaximumLength(128);
|
||||
RuleFor(x => x.ContactName).MaximumLength(64);
|
||||
RuleFor(x => x.ContactPhone).MaximumLength(32);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user