refactor: 清理租户API旧模块代码

This commit is contained in:
2026-02-17 09:57:26 +08:00
parent 2711893474
commit 992930a821
924 changed files with 7 additions and 191722 deletions

View File

@@ -1,23 +0,0 @@
using FluentValidation;
using TakeoutSaaS.Application.App.Deliveries.Commands;
namespace TakeoutSaaS.Application.App.Deliveries.Validators;
/// <summary>
/// 创建配送单命令验证器。
/// </summary>
public sealed class CreateDeliveryOrderCommandValidator : AbstractValidator<CreateDeliveryOrderCommand>
{
/// <summary>
/// 初始化验证规则。
/// </summary>
public CreateDeliveryOrderCommandValidator()
{
RuleFor(x => x.OrderId).GreaterThan(0);
RuleFor(x => x.ProviderOrderId).MaximumLength(64);
RuleFor(x => x.CourierName).MaximumLength(64);
RuleFor(x => x.CourierPhone).MaximumLength(32);
RuleFor(x => x.FailureReason).MaximumLength(256);
RuleFor(x => x.DeliveryFee).GreaterThanOrEqualTo(0).When(x => x.DeliveryFee.HasValue);
}
}

View File

@@ -1,20 +0,0 @@
using FluentValidation;
using TakeoutSaaS.Application.App.Deliveries.Queries;
namespace TakeoutSaaS.Application.App.Deliveries.Validators;
/// <summary>
/// 配送单列表查询验证器。
/// </summary>
public sealed class SearchDeliveryOrdersQueryValidator : AbstractValidator<SearchDeliveryOrdersQuery>
{
/// <summary>
/// 初始化验证规则。
/// </summary>
public SearchDeliveryOrdersQueryValidator()
{
RuleFor(x => x.Page).GreaterThan(0);
RuleFor(x => x.PageSize).InclusiveBetween(1, 200);
RuleFor(x => x.SortBy).MaximumLength(64);
}
}

View File

@@ -1,24 +0,0 @@
using FluentValidation;
using TakeoutSaaS.Application.App.Deliveries.Commands;
namespace TakeoutSaaS.Application.App.Deliveries.Validators;
/// <summary>
/// 更新配送单命令验证器。
/// </summary>
public sealed class UpdateDeliveryOrderCommandValidator : AbstractValidator<UpdateDeliveryOrderCommand>
{
/// <summary>
/// 初始化验证规则。
/// </summary>
public UpdateDeliveryOrderCommandValidator()
{
RuleFor(x => x.DeliveryOrderId).GreaterThan(0);
RuleFor(x => x.OrderId).GreaterThan(0);
RuleFor(x => x.ProviderOrderId).MaximumLength(64);
RuleFor(x => x.CourierName).MaximumLength(64);
RuleFor(x => x.CourierPhone).MaximumLength(32);
RuleFor(x => x.FailureReason).MaximumLength(256);
RuleFor(x => x.DeliveryFee).GreaterThanOrEqualTo(0).When(x => x.DeliveryFee.HasValue);
}
}