feat(api): .NET 10 multi-tenant REST API
Full backend implementation: - Multi-tenant cafe/restaurant management (menus, orders, tables, staff) - POS order flow with ZarinPal and Snappfood payment integration - OTP authentication via Kavenegar SMS - QR digital menu with public discover/finder endpoints - Customer loyalty, coupons, CRM - PostgreSQL via EF Core, Redis for caching/sessions - Background jobs, webhook handlers - Full migration history Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using FluentValidation;
|
||||
using Meezi.API.Models.Cafes;
|
||||
|
||||
namespace Meezi.API.Validators;
|
||||
|
||||
public class PatchCafeSettingsRequestValidator : AbstractValidator<PatchCafeSettingsRequest>
|
||||
{
|
||||
public PatchCafeSettingsRequestValidator()
|
||||
{
|
||||
RuleFor(x => x.Name).MaximumLength(200).When(x => x.Name is not null);
|
||||
RuleFor(x => x.Phone).MaximumLength(20).When(x => x.Phone is not null);
|
||||
RuleFor(x => x.Address).MaximumLength(500).When(x => x.Address is not null);
|
||||
RuleFor(x => x.City).MaximumLength(100).When(x => x.City is not null);
|
||||
RuleFor(x => x.Description).MaximumLength(2000).When(x => x.Description is not null);
|
||||
RuleFor(x => x.LogoUrl).MaximumLength(500).When(x => x.LogoUrl is not null);
|
||||
RuleFor(x => x.CoverImageUrl).MaximumLength(500).When(x => x.CoverImageUrl is not null);
|
||||
RuleFor(x => x.SnappfoodVendorId).MaximumLength(100).When(x => x.SnappfoodVendorId is not null);
|
||||
When(x => x.Theme is not null, () =>
|
||||
{
|
||||
RuleFor(x => x.Theme!.PaletteId).NotEmpty().MaximumLength(48);
|
||||
RuleFor(x => x.Theme!.PanelStyle).NotEmpty().MaximumLength(24);
|
||||
RuleFor(x => x.Theme!.MenuStyle).NotEmpty().MaximumLength(24);
|
||||
RuleFor(x => x.Theme!.MenuTexture).NotEmpty().MaximumLength(24);
|
||||
RuleFor(x => x.Theme!.Density).NotEmpty().MaximumLength(24);
|
||||
RuleFor(x => x.Theme!.Radius).NotEmpty().MaximumLength(24);
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user