diff options
| author | Frank <[email protected]> | 2026-01-08 19:24:20 -0500 |
|---|---|---|
| committer | Frank <[email protected]> | 2026-01-09 01:32:00 -0500 |
| commit | 52fbd16e08fe59d2d0a7a588dfa565a8ff2d2c95 (patch) | |
| tree | 86d28ed49f348ad779bcd9f22f23da9b5b601a13 /packages/console/core/src/schema/billing.sql.ts | |
| parent | cf97633d7d81c68aa154b82eeb718ba99beb13d8 (diff) | |
| download | opencode-52fbd16e08fe59d2d0a7a588dfa565a8ff2d2c95.tar.gz opencode-52fbd16e08fe59d2d0a7a588dfa565a8ff2d2c95.zip | |
wip: zen
wip: zen
Diffstat (limited to 'packages/console/core/src/schema/billing.sql.ts')
| -rw-r--r-- | packages/console/core/src/schema/billing.sql.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/console/core/src/schema/billing.sql.ts b/packages/console/core/src/schema/billing.sql.ts index 42da13776..f56cf4182 100644 --- a/packages/console/core/src/schema/billing.sql.ts +++ b/packages/console/core/src/schema/billing.sql.ts @@ -30,6 +30,20 @@ export const BillingTable = mysqlTable( ], ) +export const SubscriptionTable = mysqlTable( + "subscription", + { + ...workspaceColumns, + ...timestamps, + userID: ulid("user_id").notNull(), + rollingUsage: bigint("rolling_usage", { mode: "number" }), + fixedUsage: bigint("fixed_usage", { mode: "number" }), + timeRollingUpdated: utc("time_rolling_updated"), + timeFixedUpdated: utc("time_fixed_updated"), + }, + (table) => [...workspaceIndexes(table), uniqueIndex("workspace_user_id").on(table.workspaceID, table.userID)], +) + export const PaymentTable = mysqlTable( "payment", { |
