feat: tenants 列表支持名称/联系人/电话/认证状态过滤

This commit is contained in:
2025-12-14 16:12:25 +08:00
parent 456b575596
commit c5a3243bd8
5 changed files with 260 additions and 21 deletions

View File

@@ -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);
}
}