Files
FEDEO/backend/db/schema/accounts.ts
2026-01-06 12:07:43 +01:00

25 lines
568 B
TypeScript

import {
pgTable,
bigint,
timestamp,
text,
} from "drizzle-orm/pg-core"
export const accounts = pgTable("accounts", {
id: bigint("id", { mode: "number" })
.primaryKey()
.generatedByDefaultAsIdentity(),
createdAt: timestamp("created_at", { withTimezone: true })
.notNull()
.defaultNow(),
number: text("number").notNull(),
label: text("label").notNull(),
description: text("description"),
})
export type Account = typeof accounts.$inferSelect
export type NewAccount = typeof accounts.$inferInsert