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:
soroush.asadi
2026-05-27 21:33:48 +03:30
parent 03376b3ea1
commit ef15fd6247
472 changed files with 120358 additions and 0 deletions
@@ -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);
});
}
}