feat: season framework with 2-week auto-rotation

Create seasons engine with getCurrentSeason(), getSeasonLeaderboard(),
and resetSeasonElo(). 20 Bitcoin-themed season names. Add currentSeason
column to fights table, set on fight creation. Elo soft-reset formula:
finalElo * 0.6 + 1200 * 0.4.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-08 20:13:44 +00:00
co-authored by Claude Opus 4.6
parent d22d739666
commit ecac2bf246
5 changed files with 173 additions and 0 deletions
+1
View File
@@ -44,6 +44,7 @@ export const fights = sqliteTable('fights', {
mode: text('mode', { enum: ['free', 'ranked'] }).notNull().default('free'),
potSats: integer('pot_sats').notNull().default(0),
payoutStatus: text('payout_status', { enum: ['pending', 'paid', 'failed'] }),
currentSeason: text('current_season'),
createdAt: text('created_at').notNull(),
})