feat(repo): GetStoryDecksByClass joins story-deck presentation to product card lists

Adds StoryDeckView projection, IBuildDeckRepository.GetStoryDecksByClass interface method,
and BuildDeckRepository implementation that loads StoryDeckEntry rows for a class, fetches
matching BuildDeckProductEntry card lists, and expands each card by Number into a flat
CardIdArray. TDD: 2 tests in StoryDeckRepositoryTests (expand + empty-class).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-05-29 10:36:14 -04:00
parent e792e8d79d
commit 68d783192d
4 changed files with 129 additions and 0 deletions

View File

@@ -26,4 +26,11 @@ public interface IBuildDeckRepository
/// Returns the new total.
/// </summary>
Task<int> IncrementPurchaseCount(long viewerId, int productId);
/// <summary>
/// Story deck-select decks for a class: StoryDeckEntry presentation rows joined to the matching
/// BuildDeckProductEntry card lists (deck_no == product_id), expanded to a flat card_id array.
/// Returns build and trial decks together; the caller splits by Kind.
/// </summary>
Task<List<StoryDeckView>> GetStoryDecksByClass(int classId);
}