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:
22
SVSim.Database/Repositories/BuildDeck/StoryDeckView.cs
Normal file
22
SVSim.Database/Repositories/BuildDeck/StoryDeckView.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using SVSim.Database.Enums;
|
||||
|
||||
namespace SVSim.Database.Repositories.BuildDeck;
|
||||
|
||||
/// <summary>
|
||||
/// A story-select deck ready for the wire: presentation metadata from StoryDeckEntry plus the
|
||||
/// 40-card list expanded from the matching BuildDeckProductEntry. Plain projection, not an entity.
|
||||
/// </summary>
|
||||
public sealed class StoryDeckView
|
||||
{
|
||||
public int DeckNo { get; init; }
|
||||
public StoryDeckKind Kind { get; init; }
|
||||
public int ClassId { get; init; }
|
||||
public string DeckName { get; init; } = string.Empty;
|
||||
public int SleeveId { get; init; }
|
||||
public int LeaderSkinId { get; init; }
|
||||
public int IsRecommend { get; init; }
|
||||
public int OrderNum { get; init; }
|
||||
public int EntryNo { get; init; }
|
||||
public int? DeckFormat { get; init; }
|
||||
public List<long> CardIdArray { get; init; } = new();
|
||||
}
|
||||
Reference in New Issue
Block a user