feat: 完成门店管理剩余接口并补齐文档注释
All checks were successful
Build and Deploy TenantApi / build-and-deploy (push) Successful in 46s
All checks were successful
Build and Deploy TenantApi / build-and-deploy (push) Successful in 46s
This commit is contained in:
@@ -19,6 +19,8 @@ public sealed class CreateStoreDeliveryZoneCommandValidator : AbstractValidator<
|
||||
RuleFor(x => x.MinimumOrderAmount).GreaterThanOrEqualTo(0).When(x => x.MinimumOrderAmount.HasValue);
|
||||
RuleFor(x => x.DeliveryFee).GreaterThanOrEqualTo(0).When(x => x.DeliveryFee.HasValue);
|
||||
RuleFor(x => x.EstimatedMinutes).GreaterThan(0).When(x => x.EstimatedMinutes.HasValue);
|
||||
RuleFor(x => x.Color).MaximumLength(32);
|
||||
RuleFor(x => x.Priority).GreaterThanOrEqualTo(0);
|
||||
RuleFor(x => x.SortOrder).GreaterThanOrEqualTo(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@ public sealed class UpdateStoreDeliveryZoneCommandValidator : AbstractValidator<
|
||||
RuleFor(x => x.MinimumOrderAmount).GreaterThanOrEqualTo(0).When(x => x.MinimumOrderAmount.HasValue);
|
||||
RuleFor(x => x.DeliveryFee).GreaterThanOrEqualTo(0).When(x => x.DeliveryFee.HasValue);
|
||||
RuleFor(x => x.EstimatedMinutes).GreaterThan(0).When(x => x.EstimatedMinutes.HasValue);
|
||||
RuleFor(x => x.Color).MaximumLength(32);
|
||||
RuleFor(x => x.Priority).GreaterThanOrEqualTo(0);
|
||||
RuleFor(x => x.SortOrder).GreaterThanOrEqualTo(0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,6 +32,14 @@ public sealed class UpdateStoreFeeCommandValidator : AbstractValidator<UpdateSto
|
||||
.Must(fee => !fee.HasValue || fee.Value >= 0)
|
||||
.WithMessage("固定打包费不能为负数");
|
||||
|
||||
RuleFor(x => x.CutleryFeeAmount)
|
||||
.GreaterThanOrEqualTo(0)
|
||||
.LessThanOrEqualTo(99.99m);
|
||||
|
||||
RuleFor(x => x.RushFeeAmount)
|
||||
.GreaterThanOrEqualTo(0)
|
||||
.LessThanOrEqualTo(99.99m);
|
||||
|
||||
RuleFor(x => x)
|
||||
.Custom((command, context) =>
|
||||
{
|
||||
|
||||
@@ -17,5 +17,6 @@ public sealed class UpsertStorePickupSettingCommandValidator : AbstractValidator
|
||||
RuleFor(x => x.AllowDaysAhead).GreaterThanOrEqualTo(0);
|
||||
RuleFor(x => x.DefaultCutoffMinutes).GreaterThanOrEqualTo(0);
|
||||
RuleFor(x => x.MaxQuantityPerOrder).GreaterThan(0).When(x => x.MaxQuantityPerOrder.HasValue);
|
||||
RuleFor(x => x.FineRuleJson).MaximumLength(20000);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user