diff options
| author | Frank <[email protected]> | 2026-01-08 23:44:11 -0500 |
|---|---|---|
| committer | Frank <[email protected]> | 2026-01-09 01:32:00 -0500 |
| commit | dd5ec26c8c09b6374e379ad523e9953ce75a4417 (patch) | |
| tree | 1532ca1a4c02b894bb4a23bbedffaa7cf5bd8038 /packages/console/core/src | |
| parent | 8b062ed6214ea83452a453428675a29d84105a79 (diff) | |
| download | opencode-dd5ec26c8c09b6374e379ad523e9953ce75a4417.tar.gz opencode-dd5ec26c8c09b6374e379ad523e9953ce75a4417.zip | |
wip: black
Diffstat (limited to 'packages/console/core/src')
| -rw-r--r-- | packages/console/core/src/billing.ts | 3 | ||||
| -rw-r--r-- | packages/console/core/src/schema/billing.sql.ts | 10 |
2 files changed, 13 insertions, 0 deletions
diff --git a/packages/console/core/src/billing.ts b/packages/console/core/src/billing.ts index c97dfff1b..181055c4e 100644 --- a/packages/console/core/src/billing.ts +++ b/packages/console/core/src/billing.ts @@ -171,6 +171,9 @@ export namespace Billing { workspaceID, id: Identifier.create("payment"), amount: amountInMicroCents, + enrichment: { + type: "credit", + }, }) }) return amountInMicroCents diff --git a/packages/console/core/src/schema/billing.sql.ts b/packages/console/core/src/schema/billing.sql.ts index f56cf4182..6c2cfcf96 100644 --- a/packages/console/core/src/schema/billing.sql.ts +++ b/packages/console/core/src/schema/billing.sql.ts @@ -22,6 +22,7 @@ export const BillingTable = mysqlTable( timeReloadError: utc("time_reload_error"), timeReloadLockedTill: utc("time_reload_locked_till"), subscriptionID: varchar("subscription_id", { length: 28 }), + subscriptionCouponID: varchar("subscription_coupon_id", { length: 28 }), }, (table) => [ ...workspaceIndexes(table), @@ -54,6 +55,15 @@ export const PaymentTable = mysqlTable( paymentID: varchar("payment_id", { length: 255 }), amount: bigint("amount", { mode: "number" }).notNull(), timeRefunded: utc("time_refunded"), + enrichment: json("enrichment").$type< + | { + type: "subscription" + couponID?: string + } + | { + type: "credit" + } + >(), }, (table) => [...workspaceIndexes(table)], ) |
