26 lines
1.3 KiB
TypeScript
26 lines
1.3 KiB
TypeScript
import { mysqlTable, int, varchar, mysqlEnum } from "drizzle-orm/mysql-core";
|
|
|
|
// Subset of the real `users` table — the columns the web tier needs first.
|
|
// The complete column set will be regenerated via `db:pull` against the live DB.
|
|
export const users = mysqlTable("users", {
|
|
id: int("id").autoincrement().primaryKey(),
|
|
username: varchar("username", { length: 25 }).notNull(),
|
|
realName: varchar("real_name", { length: 25 }).notNull(),
|
|
password: varchar("password", { length: 64 }).notNull(),
|
|
mail: varchar("mail", { length: 500 }),
|
|
mailVerified: mysqlEnum("mail_verified", ["0", "1"]).notNull().default("0"),
|
|
accountCreated: int("account_created").notNull(),
|
|
lastLogin: int("last_login").notNull().default(0),
|
|
motto: varchar("motto", { length: 127 }).notNull().default(""),
|
|
look: varchar("look", { length: 256 }).notNull(),
|
|
gender: mysqlEnum("gender", ["M", "F"]).notNull().default("M"),
|
|
rank: int("rank").notNull().default(1),
|
|
credits: int("credits").notNull().default(2500),
|
|
pixels: int("pixels").notNull().default(500),
|
|
points: int("points").notNull().default(10),
|
|
online: mysqlEnum("online", ["0", "1", "2"]).notNull().default("0"),
|
|
authTicket: varchar("auth_ticket", { length: 256 }).notNull().default(""),
|
|
ipRegister: varchar("ip_register", { length: 45 }).notNull(),
|
|
ipCurrent: varchar("ip_current", { length: 45 }).notNull(),
|
|
});
|