pkgs/db/src/schemas/guilds.ts (view raw)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
import * as s from "drizzle-orm/sqlite-core";
export const guilds = s.sqliteTable("guilds", {
id: s.integer("id").primaryKey({ autoIncrement: true }),
discordId: s.text("discord_id").unique().notNull(),
name: s.text("name").notNull(),
icon: s.text("icon"),
ticketCategory: s.text("ticket_category"),
ticketLogChannel: s.text("ticket_log_channel"),
ticketGreeting: s.text("ticket_greeting"),
ticketPromptChannel: s.text("ticket_prompt_channel"),
ticketPrompt: s.text("ticket_prompt"),
createdAt: s.integer("created_at", { mode: "timestamp" }).notNull(),
updatedAt: s.integer("updated_at", { mode: "timestamp" }).notNull(),
});
export type Guild = typeof guilds.$inferSelect;
export type NewGuild = typeof guilds.$inferInsert;
|