feat: implement free/pro plan system with monitor and interval limits
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
export type Plan = "free" | "pro" | "lifetime";
|
||||
|
||||
export interface PlanLimits {
|
||||
maxMonitors: number;
|
||||
minIntervalS: number;
|
||||
}
|
||||
|
||||
const PLANS: Record<Plan, PlanLimits> = {
|
||||
free: {
|
||||
maxMonitors: 5,
|
||||
minIntervalS: 30,
|
||||
},
|
||||
pro: {
|
||||
maxMonitors: 500,
|
||||
minIntervalS: 2,
|
||||
},
|
||||
lifetime: {
|
||||
maxMonitors: 500,
|
||||
minIntervalS: 2,
|
||||
},
|
||||
};
|
||||
|
||||
export function getPlanLimits(plan: string): PlanLimits {
|
||||
return PLANS[plan as Plan] || PLANS.free;
|
||||
}
|
||||
Reference in New Issue
Block a user