Deck list work

This commit is contained in:
gamer147
2026-05-23 19:57:34 -04:00
parent 66184b3685
commit d3b2970e11
41 changed files with 70683 additions and 81 deletions

View File

@@ -6,6 +6,14 @@ namespace SVSim.Database.Repositories.Deck;
public interface IDeckRepository
{
Task<List<ShadowverseDeckEntry>> GetDecks(long viewerId, Format format);
/// <summary>
/// Bulk-fetch viewer decks grouped by format. Returns a dict keyed by every format in
/// <paramref name="formats"/> — missing formats map to empty lists so callers don't need
/// dict-existence checks. Single viewer-load, no N+1.
/// </summary>
Task<Dictionary<Format, List<ShadowverseDeckEntry>>> GetDecksByFormats(long viewerId, IEnumerable<Format> formats);
Task<ShadowverseDeckEntry?> GetDeck(long viewerId, Format format, int deckNo);
Task<int> GetEmptyDeckNumber(long viewerId, Format format);
Task<ShadowverseDeckEntry> UpsertDeck(long viewerId, Format format, int deckNo, Action<ShadowverseDeckEntry> mutate);