import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; const authSessions = sqliteTable("auth_sessions", { key: text("key").primaryKey().notNull(), session: text("session").notNull(), createdAt: integer("created_at", { mode: "timestamp" }) .notNull() .default(sql`(unixepoch())`), updatedAt: integer("updated_at", { mode: "timestamp" }) .notNull() .default(sql`(unixepoch())`), }); export type SelectAuthSession = InferSelectModel; export type InsertAuthSession = InferInsertModel; export default authSessions;