44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
|
|
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()
|
||
|
|
};
|
||
|
|
}
|