diff options
| author | Frank <[email protected]> | 2026-02-22 18:41:34 -0500 |
|---|---|---|
| committer | Frank <[email protected]> | 2026-02-22 22:19:44 -0500 |
| commit | 5712cff5c453a185ac75a160f76ca06135d6ab2d (patch) | |
| tree | 6838fedd40aed31421265fdc8b9fe5826d396f86 /packages/console/core/src/schema/billing.sql.ts | |
| parent | ee754c46f992dd4024e56e93246421246d16d13f (diff) | |
| download | opencode-5712cff5c453a185ac75a160f76ca06135d6ab2d.tar.gz opencode-5712cff5c453a185ac75a160f76ca06135d6ab2d.zip | |
zen: track session in usage
Diffstat (limited to 'packages/console/core/src/schema/billing.sql.ts')
| -rw-r--r-- | packages/console/core/src/schema/billing.sql.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/console/core/src/schema/billing.sql.ts b/packages/console/core/src/schema/billing.sql.ts index ba8f89280..6d96fc7eb 100644 --- a/packages/console/core/src/schema/billing.sql.ts +++ b/packages/console/core/src/schema/billing.sql.ts @@ -67,7 +67,7 @@ export const PaymentTable = mysqlTable( timeRefunded: utc("time_refunded"), enrichment: json("enrichment").$type< | { - type: "subscription" + type: "subscription" | "lite" couponID?: string } | { @@ -93,8 +93,9 @@ export const UsageTable = mysqlTable( cacheWrite1hTokens: int("cache_write_1h_tokens"), cost: bigint("cost", { mode: "number" }).notNull(), keyID: ulid("key_id"), + sessionID: varchar("session_id", { length: 30 }), enrichment: json("enrichment").$type<{ - plan: "sub" + plan: "sub" | "byok" | "lite" }>(), }, (table) => [...workspaceIndexes(table), index("usage_time_created").on(table.workspaceID, table.timeCreated)], |
