16 lines
736 B
TypeScript
16 lines
736 B
TypeScript
import { pgTable, timestamp, uuid, varchar } from 'drizzle-orm/pg-core';
|
|
|
|
export const users = pgTable('users', {
|
|
id: uuid('id').defaultRandom().primaryKey(),
|
|
email: varchar('email', { length: 255 }).notNull().unique(),
|
|
name: varchar('name', { length: 255 }).notNull(),
|
|
passwordHash: varchar('password_hash', { length: 255 }).notNull(),
|
|
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull(),
|
|
});
|
|
|
|
export const events = pgTable('events', {
|
|
id: uuid('id').defaultRandom().primaryKey(),
|
|
title: varchar('title', { length: 255 }).notNull(),
|
|
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull(),
|
|
videoUrl: varchar('video_url', { length: 255 }).notNull().unique(),
|
|
}); |