feat(rank): viewer repo LoadForRankProgressAsync
Split-query load of Classes (for class XP) + RankProgress (for rank grant) so RankBattleController.Finish uses a single viewer read. Test factory's ReferenceDataImporter.ImportAllAsync already seeds RankInfo — no test helper needed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -59,6 +59,14 @@ public interface IViewerRepository
|
||||
/// </summary>
|
||||
Task<Models.Viewer?> LoadForBattleXpGrantAsync(long viewerId, CancellationToken ct = default);
|
||||
|
||||
/// <summary>
|
||||
/// Load a viewer with the joins <see cref="Controllers.RankBattleController"/>'s <c>Finish</c>
|
||||
/// needs: Classes (for the class-XP grant) + RankProgress (for the rank grant). Split-query
|
||||
/// per <c>project_ef_split_query</c> to avoid the cartesian explosion when both nav
|
||||
/// collections are populated on the same viewer.
|
||||
/// </summary>
|
||||
Task<Models.Viewer?> LoadForRankProgressAsync(long viewerId, CancellationToken ct = default);
|
||||
|
||||
/// <summary>Sets Viewer.GuildId to <paramref name="guildId"/>. No-op if the viewer does not exist.</summary>
|
||||
Task SetGuildIdAsync(long viewerId, int guildId, CancellationToken ct = default);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user