feat: Introduce TimerKey enum and refactor timer key usage across services with new tests.
Some checks failed
Deploy to Production / test (push) Failing after 27s

This commit is contained in:
syntaxbullet
2026-02-13 13:11:16 +01:00
parent 570cdc69c1
commit 2d35a5eabb
5 changed files with 57 additions and 7 deletions

View File

@@ -50,7 +50,7 @@ export const userTimers = pgTable('user_timers', {
userId: bigint('user_id', { mode: 'bigint' })
.references(() => users.id, { onDelete: 'cascade' }).notNull(),
type: varchar('type', { length: 50 }).notNull(), // 'COOLDOWN', 'EFFECT', 'ACCESS'
key: varchar('key', { length: 100 }).notNull(), // 'daily', 'chn_12345', 'xp_boost'
key: varchar('key', { length: 100 }).notNull(), // TimerKey, 'chn_12345', 'xp_boost'
expiresAt: timestamp('expires_at', { withTimezone: true }).notNull(),
metadata: jsonb('metadata').default({}),
}, (table) => [