export const user = pgTable( "user", { id: serial("id").primaryKey(), name: text("name").notNull(), avatar: text("avatar"), email: text("email").notNull(), password: varchar("password", { length: 255 }), createdAt: timestamp("created_at").defaultNow(), updatedAt: timestamp("updated_at").defaultNow(), }, (table) => { return { nameIdx: index("name_idx").on(table.name), emailIdx: uniqueIndex("email_idx").on(table.email), }; });
type User = {name: string,email: string,id: number, ...}