feat: add QuestConfig interface and column to game settings schema

This commit is contained in:
syntaxbullet
2026-03-28 15:36:43 +01:00
parent 1d601febcf
commit e64ffdc4cb

View File

@@ -71,6 +71,10 @@ export interface ModerationConfig {
};
}
export interface QuestConfig {
maxActiveQuests: number;
}
export const gameSettings = pgTable('game_settings', {
id: text('id').primaryKey().default('default'),
leveling: jsonb('leveling').$type<LevelingConfig>().notNull(),
@@ -79,6 +83,7 @@ export const gameSettings = pgTable('game_settings', {
lootdrop: jsonb('lootdrop').$type<LootdropConfig>().notNull(),
trivia: jsonb('trivia').$type<TriviaConfig>().notNull(),
moderation: jsonb('moderation').$type<ModerationConfig>().notNull(),
quest: jsonb('quest').$type<QuestConfig>().notNull(),
commands: jsonb('commands').$type<Record<string, boolean>>().default({}),
system: jsonb('system').$type<Record<string, unknown>>().default({}),
createdAt: timestamp('created_at', { withTimezone: true }).defaultNow().notNull(),