juntekim.com/stripe_to_invoice/lib/schema/stripeAccounts.ts
2026-01-18 15:13:45 +00:00

13 lines
No EOL
463 B
TypeScript

import { pgTable, uuid, text, timestamp } from "drizzle-orm/pg-core";
import { users } from "./users";
export const stripeAccounts = pgTable("stripe_accounts", {
id: uuid("id").defaultRandom().primaryKey(),
userId: uuid("user_id")
.notNull()
.references(() => users.id, { onDelete: "cascade" }),
stripeAccountId: text("stripe_account_id").notNull(),
createdAt: timestamp("created_at", { withTimezone: true })
.notNull()
.defaultNow(),
});