18 lines
710 B
TypeScript
18 lines
710 B
TypeScript
import { pgTable, text, timestamp, uuid } from "drizzle-orm/pg-core";
|
|
|
|
export const xeroConnections = pgTable("xero_connections", {
|
|
id: uuid("id").primaryKey().defaultRandom(),
|
|
userId: uuid("user_id").notNull(),
|
|
tenantId: text("tenant_id").notNull(),
|
|
|
|
accessToken: text("access_token").notNull(),
|
|
refreshToken: text("refresh_token").notNull(),
|
|
expiresAt: timestamp("expires_at", { withTimezone: true }).notNull(),
|
|
|
|
// ✅ ADD THESE
|
|
salesAccountCode: text("sales_account_code"),
|
|
stripeClearingAccountCode: text("stripe_clearing_account_code"),
|
|
|
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull(),
|
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull(),
|
|
});
|