Files
FEDEO/backend/db/schema/auth_users.ts
florianfederspiel 7e0a2f5e4f
Some checks failed
Build and Push Docker Images / build-backend (push) Failing after 25s
Build and Push Docker Images / build-frontend (push) Successful in 1m22s
New Admin Dashboard
2026-03-18 18:34:02 +01:00

24 lines
817 B
TypeScript

import { pgTable, uuid, text, boolean, timestamp } from "drizzle-orm/pg-core"
export const authUsers = pgTable("auth_users", {
id: uuid("id").primaryKey().defaultRandom(),
created_at: timestamp("created_at", { withTimezone: true })
.notNull()
.defaultNow(),
email: text("email").notNull(),
passwordHash: text("password_hash").notNull(),
multiTenant: boolean("multi_tenant").notNull().default(true),
must_change_password: boolean("must_change_password").notNull().default(false),
is_admin: boolean("is_admin").notNull().default(false),
updatedAt: timestamp("updated_at", { withTimezone: true }),
ported: boolean("ported").notNull().default(true),
})
export type AuthUser = typeof authUsers.$inferSelect
export type NewAuthUser = typeof authUsers.$inferInsert