export const User = pgTable(
'User',
{
email: text('email').notNull(),
id: text('id').default(crypto.randomUUID()).primaryKey().notNull(),
joinedDate: timestamp('joinedDate', { mode: 'string', precision: 3 }).defaultNow().notNull(),
lastLoginDate: timestamp('lastLoginDate', { mode: 'string', precision: 3 }).defaultNow().notNull(),
logins: integer('logins').default(1).notNull(),
password: text('password').notNull()
},
(table) => ({
email_key: uniqueIndex('User_email_key').on(table.email)
})
);
export const User = pgTable(
'User',
{
email: text('email').notNull(),
id: text('id').default(crypto.randomUUID()).primaryKey().notNull(),
joinedDate: timestamp('joinedDate', { mode: 'string', precision: 3 }).defaultNow().notNull(),
lastLoginDate: timestamp('lastLoginDate', { mode: 'string', precision: 3 }).defaultNow().notNull(),
logins: integer('logins').default(1).notNull(),
password: text('password').notNull()
},
(table) => ({
email_key: uniqueIndex('User_email_key').on(table.email)
})
);