import { type InferInsertModel, type InferSelectModel, sql } from "drizzle-orm"; import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core"; const genres = sqliteTable("genres", { id: text("id").primaryKey().notNull(), name: text("name").unique().notNull(), createdAt: integer("created_at", { mode: "timestamp" }) .notNull() .default(sql`(unixepoch())`), updatedAt: integer("updated_at", { mode: "timestamp" }) .notNull() .default(sql`(unixepoch())`), }); export type SelectGenre = InferSelectModel; export type InsertGenre = InferInsertModel; export default genres;