const admins = createTable("admins", {
id: int("id").autoincrement().primaryKey(),
name: varchar("name", { length: 255 }).notNull().unique(),
username: varchar("username", { length: 12 }).notNull(),
email: varchar("email", { length: 255 }).notNull(),
phone: varchar("phone", { length: 15 }).notNull(),
passwordHash: varchar("password_hash", { length: 255 }).notNull(),
...created_updated_at,
}, (t)=>[
uniqueIndex("username_idx").on(t.username),
index("email_idx").on(t.email),
index("phone_idx").on(t.phone),
],
);
const admins = createTable("admins", {
id: int("id").autoincrement().primaryKey(),
name: varchar("name", { length: 255 }).notNull().unique(),
username: varchar("username", { length: 12 }).notNull(),
email: varchar("email", { length: 255 }).notNull(),
phone: varchar("phone", { length: 15 }).notNull(),
passwordHash: varchar("password_hash", { length: 255 }).notNull(),
...created_updated_at,
}, (t)=>[
uniqueIndex("username_idx").on(t.username),
index("email_idx").on(t.email),
index("phone_idx").on(t.phone),
],
);