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,56 @@
|
||||
using Meezi.Core.Enums;
|
||||
|
||||
namespace Meezi.Core.Entities;
|
||||
|
||||
public class Cafe : BaseEntity
|
||||
{
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? NameAr { get; set; }
|
||||
public string? NameEn { get; set; }
|
||||
public string Slug { get; set; } = string.Empty;
|
||||
public string? Phone { get; set; }
|
||||
public string? Address { get; set; }
|
||||
public string? City { get; set; }
|
||||
public string? LogoUrl { get; set; }
|
||||
public string? CoverImageUrl { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public PlanTier PlanTier { get; set; } = PlanTier.Free;
|
||||
public DateTime? PlanExpiresAt { get; set; }
|
||||
public bool IsVerified { get; set; }
|
||||
/// <summary>When true, merchant API access is blocked until reactivated by platform admin.</summary>
|
||||
public bool IsSuspended { get; set; }
|
||||
public string? SnappfoodVendorId { get; set; }
|
||||
public string? Tap30VendorId { get; set; }
|
||||
public string? DigikalaVendorId { get; set; }
|
||||
public string PreferredLanguage { get; set; } = "fa";
|
||||
/// <summary>JSON <see cref="Branding.CafeTheme"/> for dashboard + guest menu colors/styles.</summary>
|
||||
public string? ThemeJson { get; set; }
|
||||
/// <summary>JSON <see cref="Discover.CafeDiscoverProfile"/> for discover / AI matching.</summary>
|
||||
public string? DiscoverProfileJson { get; set; }
|
||||
/// <summary>JSON array of <see cref="Discover.CafeBadgeCatalog"/> keys (Enterprise, admin-assigned).</summary>
|
||||
public string? DiscoverBadgesJson { get; set; }
|
||||
/// <summary>JSON array of up to 8 gallery photo URLs (owner-managed).</summary>
|
||||
public string? GalleryJson { get; set; }
|
||||
/// <summary>JSON <see cref="Discover.WorkingHoursSchedule"/> per-day schedule.</summary>
|
||||
public string? WorkingHoursJson { get; set; }
|
||||
/// <summary>Instagram handle without @, max 80 chars.</summary>
|
||||
public string? InstagramHandle { get; set; }
|
||||
/// <summary>Cafe website URL, max 300 chars.</summary>
|
||||
public string? WebsiteUrl { get; set; }
|
||||
/// <summary>Default VAT/sales tax % for all branches unless branch override is allowed.</summary>
|
||||
public decimal DefaultTaxRate { get; set; } = 9m;
|
||||
public bool AllowBranchTaxOverride { get; set; }
|
||||
|
||||
public ICollection<Branch> Branches { get; set; } = [];
|
||||
public ICollection<Table> Tables { get; set; } = [];
|
||||
public ICollection<Employee> Employees { get; set; } = [];
|
||||
public ICollection<MenuCategory> MenuCategories { get; set; } = [];
|
||||
public ICollection<MenuItem> MenuItems { get; set; } = [];
|
||||
public ICollection<Order> Orders { get; set; } = [];
|
||||
public ICollection<Customer> Customers { get; set; } = [];
|
||||
public ICollection<Coupon> Coupons { get; set; } = [];
|
||||
public ICollection<Tax> Taxes { get; set; } = [];
|
||||
public ICollection<CafeReview> Reviews { get; set; } = [];
|
||||
public ICollection<SubscriptionPayment> SubscriptionPayments { get; set; } = [];
|
||||
public ICollection<Ingredient> Ingredients { get; set; } = [];
|
||||
}
|
||||
Reference in New Issue
Block a user