Feat: chat archiving + ranked OP rewards + admin award OP
- ChatChannel: add ArchivedAt (nullable DateTimeOffset) - ChatChannelMembership.EndMatchMembershipsAsync: set channel.ArchivedAt so match channels are archived when games end - GameHandlerBase.FinalizeGameAsync: add IEventBus param; compute OriginPoints rewards scaled by rank diff; publish GameEndedEvent so ChatLifecycleHostedService triggers archival - GameRuleSet: add WinnerOpReward (50), LoserOpReward (10), RankDiffOpMultiplierPct (0) with NOT NULL + defaults - GameMessages.GameOverPush: add WinnerOpDelta / LoserOpDelta fields - GameConcedeHandler + GameAttackHandler: inject IEventBus, pass to FinalizeGameAsync - Migrations: 20260309200000_AddArchivedAtToChatChannel (ChatDbContext), 20260309210000_AddOpRewardFields (GameDbContext) - Admin GameSessionsPage: inject ChatDbContext; purge Match channels before deleting sessions in PurgeAllAsync - Admin RankedRulesPage: new "Origin Points Rewards" card with three number inputs (WinnerOpReward, LoserOpReward, RankDiffOpMultiplierPct) - Admin AccountDetail: display RankScore + OriginPoints in Profile card; new "Award OP" card that credits OP directly to the account balance Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -149,6 +149,9 @@ namespace SOR.Database.Migrations.Game
|
||||
b.Property<bool>("IsRankedDefault")
|
||||
.HasColumnType("boolean");
|
||||
|
||||
b.Property<int>("LoserOpReward")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
@@ -156,6 +159,9 @@ namespace SOR.Database.Migrations.Game
|
||||
b.Property<int>("OpeningHandSize")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("RankDiffOpMultiplierPct")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.Property<int>("SpAccumulationPerTurn")
|
||||
.HasColumnType("integer");
|
||||
|
||||
@@ -168,6 +174,9 @@ namespace SOR.Database.Migrations.Game
|
||||
b.Property<DateTimeOffset>("UpdatedAt")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<int>("WinnerOpReward")
|
||||
.HasColumnType("integer");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("IsCustomDefault");
|
||||
|
||||
Reference in New Issue
Block a user