forked from syntaxbullet/aurorabot
feat: Introduce TimerKey enum and refactor timer key usage across services with new tests.
This commit is contained in:
@@ -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) => [
|
||||
|
||||
Reference in New Issue
Block a user