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,43 @@
|
||||
namespace Meezi.Core.Platform;
|
||||
|
||||
public class PlanLimitsData
|
||||
{
|
||||
public int MaxOrdersPerDay { get; set; } = int.MaxValue;
|
||||
public int MaxTerminals { get; set; } = int.MaxValue;
|
||||
public int MaxCustomers { get; set; } = int.MaxValue;
|
||||
public int MaxSmsPerMonth { get; set; } = int.MaxValue;
|
||||
public int MaxBranches { get; set; } = int.MaxValue;
|
||||
public int MaxReportHistoryDays { get; set; } = int.MaxValue;
|
||||
|
||||
public static PlanLimitsData ForTier(Enums.PlanTier tier) => tier switch
|
||||
{
|
||||
Enums.PlanTier.Free => new PlanLimitsData
|
||||
{
|
||||
MaxOrdersPerDay = 50,
|
||||
MaxTerminals = 1,
|
||||
MaxCustomers = 50,
|
||||
MaxSmsPerMonth = 0,
|
||||
MaxBranches = 1,
|
||||
MaxReportHistoryDays = 8
|
||||
},
|
||||
Enums.PlanTier.Pro => new PlanLimitsData
|
||||
{
|
||||
MaxOrdersPerDay = int.MaxValue,
|
||||
MaxTerminals = 3,
|
||||
MaxCustomers = int.MaxValue,
|
||||
MaxSmsPerMonth = 50,
|
||||
MaxBranches = 3,
|
||||
MaxReportHistoryDays = 90
|
||||
},
|
||||
Enums.PlanTier.Business => new PlanLimitsData
|
||||
{
|
||||
MaxOrdersPerDay = int.MaxValue,
|
||||
MaxTerminals = int.MaxValue,
|
||||
MaxCustomers = int.MaxValue,
|
||||
MaxSmsPerMonth = 200,
|
||||
MaxBranches = int.MaxValue,
|
||||
MaxReportHistoryDays = int.MaxValue
|
||||
},
|
||||
_ => new PlanLimitsData()
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user