Files
ballistic-builder/src/db/schema/Account.ts

15 lines
647 B
TypeScript
Raw Normal View History

2024-12-11 23:26:14 -05:00
import { pgTable, integer, varchar, uuid } from "drizzle-orm/pg-core";
import { sql } from "drizzle-orm";
2024-11-20 09:02:38 -05:00
import { timestamps } from "./helpers/columns.helpers";
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-12-10 17:19:59 -05:00
uuid: uuid().defaultRandom().unique(),
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(),
...timestamps
})