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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user