Refactor leaderboard logic: incorporate room context into leaderboard stats and channel metadata handling

This commit is contained in:
Alexa
2026-06-05 23:55:26 +03:00
parent 97e0fa5716
commit fe1c2c53e3
10 changed files with 257 additions and 106 deletions
@@ -1119,7 +1119,7 @@ namespace DorkNet.Server.Migrations
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Channel");
b.HasKey("RoomId", "Channel");
b.HasIndex("RoomId");
@@ -1135,6 +1135,9 @@ namespace DorkNet.Server.Migrations
b.Property<long>("PlayerId")
.HasColumnType("INTEGER");
b.Property<long>("RoomId")
.HasColumnType("INTEGER");
b.Property<int>("StatChannel")
.HasColumnType("INTEGER");
@@ -1146,10 +1149,10 @@ namespace DorkNet.Server.Migrations
b.HasKey("Id");
b.HasIndex("PlayerId", "StatChannel")
b.HasIndex("RoomId", "PlayerId", "StatChannel")
.IsUnique();
b.HasIndex("StatChannel", "Value");
b.HasIndex("RoomId", "StatChannel", "Value");
b.ToTable("LeaderboardStats");
});