stock.geolock.fr/apps/api/dist/db/schema/users.js
2026-02-24 16:10:30 +00:00

10 lines
488 B
JavaScript

import { pgTable, text, timestamp, uuid } from 'drizzle-orm/pg-core';
export const users = pgTable('users', {
id: uuid('id').primaryKey().defaultRandom(),
username: text('username').notNull().unique(),
passwordHash: text('password_hash').notNull(),
displayName: text('display_name').notNull(),
createdAt: timestamp('created_at', { withTimezone: true }).notNull().defaultNow(),
updatedAt: timestamp('updated_at', { withTimezone: true }).notNull().defaultNow(),
});