Billing Core
stackfoundry/billing-coreFreeBlock
Provider-neutral customer, plan, and subscription primitives.
Install it
npx shadcn@latest add https://stackfoundry.dev/r/billing-core.jsonSource
1import { index, jsonb, pgTable, text, timestamp, uuid } from "drizzle-orm/pg-core";23export const billingCore = pgTable(4 "billing_core",5 {6 id: uuid("id").primaryKey().defaultRandom(),7 ownerId: text("owner_id"),8 organizationId: text("organization_id"),9 key: text("key").notNull(),10 title: text("title").notNull(),11 status: text("status").notNull().default("active"),12 metadata: jsonb("metadata").$type<Record<string, unknown>>().notNull().default({}),13 createdAt: timestamp("created_at", { withTimezone: true }).defaultNow().notNull(),14 updatedAt: timestamp("updated_at", { withTimezone: true }).defaultNow().notNull(),15 },16 (item) => [17 index("billing_core_owner_idx").on(item.ownerId),18 index("billing_core_organization_idx").on(item.organizationId),19 ]20);
What it pulls in
Other registry items
Files it writes
More from stackfoundry
All 157 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Account Deletionaccount-deletion | stackfoundry | Blocks | Free | no deps · 3 files | |
| Account Modesaccount-modes | stackfoundry | Blocks | Free | no deps · 3 files | |
| Account Settingsaccount-settings | stackfoundry | Blocks | Free | no deps · 2 files | |
| Admin Consoleadmin-console | stackfoundry | Blocks | Free | no deps · 2 files | |
| Agent-Ready Installsagent-ready-installs | stackfoundry | Blocks | Free | no deps · 13 files | |
| AI Chatai-chat | stackfoundry | Blocks | Free | 3 deps · 4 files | |
| AI Chatbot SDKai-chatbot-sdk | stackfoundry | Blocks | Free | 3 deps · 2 files | |
| AI Elementsai-elements | stackfoundry | Blocks | Free | no deps · 5 files |
