2024-11-18 23:48:33 -05:00
|
|
|
import { pgTable, integer, varchar } from "drizzle-orm/pg-core";
|
|
|
|
|
import { sql } from "drizzle-orm";
|
2024-11-20 09:02:38 -05:00
|
|
|
import { timestamps } from "./helpers/columns.helpers";
|
2024-11-18 23:48:33 -05:00
|
|
|
|
2024-11-19 21:15:15 -05:00
|
|
|
export const Account = pgTable("bal_accounts", {
|
2024-11-19 15:21:30 -05:00
|
|
|
id: integer().primaryKey().generatedAlwaysAsIdentity({ name: "accounts_id_seq", startWith: 1, increment: 1, minValue: 1, maxValue: 2147483647, cache: 1 }),
|
2024-11-18 23:48:33 -05:00
|
|
|
first_name: varchar({ length: 40 }),
|
|
|
|
|
last_name: varchar({ length: 40 }),
|
2024-11-19 11:03:32 -05:00
|
|
|
email: varchar({length: 100}),
|
2024-11-19 15:21:30 -05:00
|
|
|
username: varchar({length:50}).notNull().unique(),
|
|
|
|
|
password_hash: varchar({length:255}).notNull().unique(),
|
|
|
|
|
|
2024-11-18 23:48:33 -05:00
|
|
|
...timestamps
|
|
|
|
|
})
|