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
+42
View File
@@ -0,0 +1,42 @@
namespace Meezi.Core.Entities;
/// <summary>Physical branch (شعبه) under a café tenant.</summary>
public class Branch : TenantEntity
{
public string Name { get; set; } = string.Empty;
public string? Address { get; set; }
public string? City { get; set; }
public string? Phone { get; set; }
public bool IsActive { get; set; } = true;
public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
/// <summary>When set with <see cref="BaseEntity.DeletedAt"/>, branch can be restored until this UTC time.</summary>
public DateTime? ScheduledPermanentDeleteAt { get; set; }
// Thermal printer (TCP ESC/POS)
public string? ReceiptPrinterIp { get; set; }
public int? ReceiptPrinterPort { get; set; }
public string? KitchenPrinterIp { get; set; }
public int? KitchenPrinterPort { get; set; }
public int PaperWidthMm { get; set; } = 80;
public bool AutoCutEnabled { get; set; } = true;
public string? ReceiptHeader { get; set; }
public string? ReceiptFooter { get; set; }
public string? WifiPassword { get; set; }
/// <summary>Branch-specific logo on QR guest menu (falls back to café logo).</summary>
public string? LogoUrl { get; set; }
public string? WelcomeText { get; set; }
public string? AccentColor { get; set; }
/// <summary>Branch tax % when café <see cref="Cafe.AllowBranchTaxOverride"/> is true.</summary>
public decimal? TaxRate { get; set; }
// Card POS terminal (HTTP bridge on local network)
public string? PosDeviceIp { get; set; }
public int? PosDevicePort { get; set; }
public Cafe Cafe { get; set; } = null!;
public ICollection<TableSection> Sections { get; set; } = [];
public ICollection<Table> Tables { get; set; } = [];
public ICollection<Order> Orders { get; set; } = [];
public ICollection<Employee> Staff { get; set; } = [];
}