chore codes

This commit is contained in:
oiov
2025-04-24 18:17:04 +08:00
parent b8cef89e4b
commit 3c0bd3b8be
2 changed files with 7 additions and 11 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ export const PricingSection = () => {
benefits={getBenefits(Team_Plan_Quota.free)}
/>
<PriceCard
tier="Pro"
tier="Premium"
price="$5/mo"
bestFor="Best for 5-50 users"
CTA={
+6 -10
View File
@@ -44,20 +44,16 @@ export const Team_Plan_Quota = {
},
};
type TimeRangeType = "day" | "month"; // 支持的限制周期
type TimeRangeType = "day" | "month";
interface RestrictOptions {
model: keyof PrismaClient; // Prisma 模型名称,如 'userEmail'
userId: string; // 用户 ID
limit: number; // 限制数量
rangeType: TimeRangeType; // 限制周期:'day' 或 'month'
referenceDate?: Date; // 可选,参考日期,默认为当前时间
model: keyof PrismaClient;
userId: string;
limit: number;
rangeType: TimeRangeType;
referenceDate?: Date;
}
/**
* 根据指定时间范围检查记录数量是否超过限制
* @throws 如果超过限制,抛出错误
*/
export async function restrictByTimeRange({
model,
userId,