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,44 @@
|
||||
using Meezi.Core.Constants;
|
||||
using Meezi.Core.Enums;
|
||||
using Xunit;
|
||||
|
||||
namespace Meezi.API.Tests;
|
||||
|
||||
public class PlanLimitsTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData(PlanTier.Free, 1)]
|
||||
[InlineData(PlanTier.Pro, 3)]
|
||||
public void MaxBranches_MatchesTier(PlanTier tier, int expected)
|
||||
{
|
||||
Assert.Equal(expected, PlanLimits.MaxBranches(tier));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MaxBranches_Business_IsUnlimited()
|
||||
{
|
||||
Assert.Equal(int.MaxValue, PlanLimits.MaxBranches(PlanTier.Business));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(PlanTier.Free, 8)]
|
||||
[InlineData(PlanTier.Pro, 90)]
|
||||
public void MaxReportHistoryDays_MatchesTier(PlanTier tier, int expected)
|
||||
{
|
||||
Assert.Equal(expected, PlanLimits.MaxReportHistoryDays(tier));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void MaxReportHistoryDays_Business_IsUnlimited()
|
||||
{
|
||||
Assert.Equal(int.MaxValue, PlanLimits.MaxReportHistoryDays(PlanTier.Business));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(PlanTier.Free, 1)]
|
||||
[InlineData(PlanTier.Pro, 3)]
|
||||
public void MaxTerminals_MatchesTier(PlanTier tier, int expected)
|
||||
{
|
||||
Assert.Equal(expected, PlanLimits.MaxTerminals(tier));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user