feat: add new subscription tier and update credit configurations
- Introduced a new "max" subscription tier with associated monthly credits and top-up limits. - Updated existing subscription tiers' monthly credits and top-up limits for "starter", "pro", and "business". - Enhanced credit display and overview components to reflect the new tier and its attributes. - Integrated Polar authentication features for improved subscription management and credit handling.
This commit is contained in:
@@ -258,6 +258,7 @@ export default defineSchema({
|
||||
v.literal("free"),
|
||||
v.literal("starter"),
|
||||
v.literal("pro"),
|
||||
v.literal("max"),
|
||||
v.literal("business")
|
||||
),
|
||||
status: v.union(
|
||||
@@ -268,11 +269,13 @@ export default defineSchema({
|
||||
),
|
||||
currentPeriodStart: v.number(), // Timestamp (ms)
|
||||
currentPeriodEnd: v.number(), // Timestamp (ms)
|
||||
polarSubscriptionId: v.optional(v.string()),
|
||||
lemonSqueezySubscriptionId: v.optional(v.string()),
|
||||
lemonSqueezyCustomerId: v.optional(v.string()),
|
||||
cancelAtPeriodEnd: v.optional(v.boolean()), // Kündigung zum Periodenende
|
||||
})
|
||||
.index("by_user", ["userId"])
|
||||
.index("by_polar", ["polarSubscriptionId"])
|
||||
.index("by_lemon_squeezy", ["lemonSqueezySubscriptionId"]),
|
||||
|
||||
// ==========================================================================
|
||||
|
||||
Reference in New Issue
Block a user