Files
SVSimServer/SVSim.Database/Repositories/BuildDeck/StoryDeckView.cs
gamer147 68d783192d 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>
2026-05-29 10:36:14 -04:00

23 lines
820 B
C#

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();
}