mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-07 22:24:06 -05:00
improvement(pricing): increase free user limit to 20 usd (#2536)
* improvement(pricing): increase free user limit to 20 usd * make gemini pricing accurate * generate migration for db constant * update docs * test notif data
This commit is contained in:
committed by
GitHub
parent
be9ab4c833
commit
6af291ca9f
@@ -6,7 +6,7 @@
|
||||
/**
|
||||
* Default free credits (in dollars) for new users
|
||||
*/
|
||||
export const DEFAULT_FREE_CREDITS = 10
|
||||
export const DEFAULT_FREE_CREDITS = 20
|
||||
|
||||
/**
|
||||
* Storage limit constants (in GB)
|
||||
|
||||
1
packages/db/migrations/0131_illegal_nova.sql
Normal file
1
packages/db/migrations/0131_illegal_nova.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE "user_stats" ALTER COLUMN "current_usage_limit" SET DEFAULT '20';
|
||||
8451
packages/db/migrations/meta/0131_snapshot.json
Normal file
8451
packages/db/migrations/meta/0131_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -911,6 +911,13 @@
|
||||
"when": 1766433914366,
|
||||
"tag": "0130_bored_master_chief",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 131,
|
||||
"version": "7",
|
||||
"when": 1766460889694,
|
||||
"tag": "0131_illegal_nova",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -653,7 +653,7 @@ export const userStats = pgTable('user_stats', {
|
||||
totalChatExecutions: integer('total_chat_executions').notNull().default(0),
|
||||
totalTokensUsed: integer('total_tokens_used').notNull().default(0),
|
||||
totalCost: decimal('total_cost').notNull().default('0'),
|
||||
currentUsageLimit: decimal('current_usage_limit').default(DEFAULT_FREE_CREDITS.toString()), // Default $10 for free plan, null for team/enterprise
|
||||
currentUsageLimit: decimal('current_usage_limit').default(DEFAULT_FREE_CREDITS.toString()), // Default $20 for free plan, null for team/enterprise
|
||||
usageLimitUpdatedAt: timestamp('usage_limit_updated_at').defaultNow(),
|
||||
// Billing period tracking
|
||||
currentPeriodCost: decimal('current_period_cost').notNull().default('0'), // Usage in current billing period
|
||||
|
||||
Reference in New Issue
Block a user