feat(db): StoryDeckEntry presentation table + StoryDeckKind enum
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
11
SVSim.Database/Enums/StoryDeckKind.cs
Normal file
11
SVSim.Database/Enums/StoryDeckKind.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace SVSim.Database.Enums;
|
||||
|
||||
/// <summary>
|
||||
/// Which story deck-select group a prebuilt deck belongs to. Build = the named story decks
|
||||
/// (build_deck_list); Trial = archetype trial decks (trial_deck_list). Stored as int.
|
||||
/// </summary>
|
||||
public enum StoryDeckKind
|
||||
{
|
||||
Build = 0,
|
||||
Trial = 1,
|
||||
}
|
||||
28
SVSim.Database/Models/StoryDeckEntry.cs
Normal file
28
SVSim.Database/Models/StoryDeckEntry.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using SVSim.Database.Common;
|
||||
using SVSim.Database.Enums;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Presentation metadata for a story-mode prebuilt/trial deck, as surfaced under
|
||||
/// main_story/get_deck_list's build_deck_list / trial_deck_list. PK (DeckNo) equals the deck's
|
||||
/// wire deck_no, which also equals BuildDeckProductEntry.Id — the 40-card list is read from that
|
||||
/// product (single source of truth), NOT stored here. Sourced from
|
||||
/// data_dumps/traffic_prod_trial_decks.ndjson via seeds/story-decks.json.
|
||||
/// </summary>
|
||||
public class StoryDeckEntry : BaseEntity<int>
|
||||
{
|
||||
public int DeckNo { get => Id; set => Id = value; } // == BuildDeckProductEntry.Id
|
||||
|
||||
public StoryDeckKind Kind { get; set; }
|
||||
public int ClassId { get; set; }
|
||||
public string DeckName { get; set; } = string.Empty;
|
||||
public int SleeveId { get; set; }
|
||||
public int LeaderSkinId { get; set; }
|
||||
public int IsRecommend { get; set; }
|
||||
public int OrderNum { get; set; }
|
||||
public int EntryNo { get; set; }
|
||||
|
||||
/// <summary>Trial decks carry a deck_format on the wire; build decks do not (null).</summary>
|
||||
public int? DeckFormat { get; set; }
|
||||
}
|
||||
@@ -70,6 +70,7 @@ public class SVSimDbContext : DbContext
|
||||
public DbSet<PackConfigEntry> Packs => Set<PackConfigEntry>();
|
||||
public DbSet<BuildDeckSeriesEntry> BuildDeckSeries => Set<BuildDeckSeriesEntry>();
|
||||
public DbSet<BuildDeckProductEntry> BuildDeckProducts => Set<BuildDeckProductEntry>();
|
||||
public DbSet<StoryDeckEntry> StoryDecks => Set<StoryDeckEntry>();
|
||||
public DbSet<SleeveShopSeriesEntry> SleeveShopSeries => Set<SleeveShopSeriesEntry>();
|
||||
public DbSet<SleeveShopProductEntry> SleeveShopProducts => Set<SleeveShopProductEntry>();
|
||||
public DbSet<ItemPurchaseCatalogEntry> ItemPurchaseCatalog => Set<ItemPurchaseCatalogEntry>();
|
||||
|
||||
Reference in New Issue
Block a user