Seeding updated
This commit is contained in:
27
SVSim.Database/Models/ArenaSeasonConfig.cs
Normal file
27
SVSim.Database/Models/ArenaSeasonConfig.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Singleton row (Id=1) capturing the current Take Two arena season config from
|
||||
/// /load/index data.arena_info[0]. FormatInfo jsonb holds the nested
|
||||
/// {two_pick_type, card_pool_name, announce_id, last_card_pack_set_id, start_time, end_time}.
|
||||
/// </summary>
|
||||
public class ArenaSeasonConfig : BaseEntity<int>
|
||||
{
|
||||
public int Mode { get; set; }
|
||||
|
||||
public int Enable { get; set; }
|
||||
|
||||
public ulong Cost { get; set; }
|
||||
|
||||
public ulong RupyCost { get; set; }
|
||||
|
||||
public int TicketCost { get; set; }
|
||||
|
||||
public bool IsJoin { get; set; }
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string FormatInfo { get; set; } = "{}";
|
||||
}
|
||||
30
SVSim.Database/Models/AvatarAbilityEntry.cs
Normal file
30
SVSim.Database/Models/AvatarAbilityEntry.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// One Avatar (Hero) mode definition. Keyed by leader_skin_id. The Ability/PassiveAbility strings
|
||||
/// are the dense "(skill:...)(timing:...)" effect DSL that cannot be reconstructed from card master —
|
||||
/// preserve verbatim from /load/index data.avatar_info.abilities[leaderSkinId].
|
||||
/// </summary>
|
||||
public class AvatarAbilityEntry : BaseEntity<int>
|
||||
{
|
||||
public int LeaderSkinId { get => Id; set => Id = value; }
|
||||
|
||||
public int BattleStartFirstPlayerTurnBp { get; set; }
|
||||
|
||||
public int BattleStartSecondPlayerTurnBp { get; set; }
|
||||
|
||||
public int BattleStartMaxLife { get; set; }
|
||||
|
||||
public string AbilityCost { get; set; } = string.Empty;
|
||||
|
||||
public string Ability { get; set; } = string.Empty;
|
||||
|
||||
public string PassiveAbility { get; set; } = string.Empty;
|
||||
|
||||
public string AbilityDesc { get; set; } = string.Empty;
|
||||
|
||||
public string PassiveAbilityDesc { get; set; } = string.Empty;
|
||||
}
|
||||
24
SVSim.Database/Models/BannerEntry.cs
Normal file
24
SVSim.Database/Models/BannerEntry.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// One mypage banner from /mypage/index data.banner. Id is synthetic ordinal (1-N) since the wire
|
||||
/// has no explicit ID. Highly time-varying content — recapture aggressively before EOS.
|
||||
/// </summary>
|
||||
public class BannerEntry : BaseEntity<int>
|
||||
{
|
||||
public string ImageName { get; set; } = string.Empty;
|
||||
|
||||
public string Click { get; set; } = string.Empty;
|
||||
|
||||
public string Status { get; set; } = string.Empty;
|
||||
|
||||
public int ChangeTime { get; set; }
|
||||
|
||||
public int RemainingTime { get; set; }
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string ImagePaths { get; set; } = "[]";
|
||||
}
|
||||
16
SVSim.Database/Models/BattlePassLevelEntry.cs
Normal file
16
SVSim.Database/Models/BattlePassLevelEntry.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// One battle pass level (1-100). RewardData jsonb holds the per-level reward blob from
|
||||
/// /load/index data.battle_pass_level_info[level]. Shape varies per level so we preserve verbatim.
|
||||
/// </summary>
|
||||
public class BattlePassLevelEntry : BaseEntity<int>
|
||||
{
|
||||
public int Level { get => Id; set => Id = value; }
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string RewardData { get; set; } = "{}";
|
||||
}
|
||||
42
SVSim.Database/Models/ColosseumConfig.cs
Normal file
42
SVSim.Database/Models/ColosseumConfig.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Singleton row (Id=1) for the current Colosseum event from /mypage/index data.colosseum_info.
|
||||
/// Time-bound — recapture per Colosseum cycle (every few weeks).
|
||||
/// </summary>
|
||||
public class ColosseumConfig : BaseEntity<int>
|
||||
{
|
||||
public string ColosseumId { get; set; } = string.Empty;
|
||||
|
||||
public string ColosseumName { get; set; } = string.Empty;
|
||||
|
||||
public string CardPoolName { get; set; } = string.Empty;
|
||||
|
||||
public string DeckFormat { get; set; } = string.Empty;
|
||||
|
||||
public DateTime StartTime { get; set; }
|
||||
|
||||
public DateTime EndTime { get; set; }
|
||||
|
||||
public string NowRound { get; set; } = string.Empty;
|
||||
|
||||
public string IsDisplayTips { get; set; } = string.Empty;
|
||||
|
||||
public string TipsId { get; set; } = string.Empty;
|
||||
|
||||
public bool IsColosseumPeriod { get; set; }
|
||||
|
||||
public bool IsRoundPeriod { get; set; }
|
||||
|
||||
public string IsNormalTwoPick { get; set; } = string.Empty;
|
||||
|
||||
public string IsSpecialMode { get; set; } = string.Empty;
|
||||
|
||||
public int IsAllCardEnabled { get; set; }
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string SalesPeriodInfo { get; set; } = "{}";
|
||||
}
|
||||
17
SVSim.Database/Models/DailyLoginBonusEntry.cs
Normal file
17
SVSim.Database/Models/DailyLoginBonusEntry.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Daily login bonus campaign from /load/index data.daily_login_bonus (dict keyed by bonus_id,
|
||||
/// values are arrays of bonus days). Prod observed keys {1, 3, 4} with empty arrays — recapture
|
||||
/// target during active login bonus events.
|
||||
/// </summary>
|
||||
public class DailyLoginBonusEntry : BaseEntity<int>
|
||||
{
|
||||
public int BonusId { get => Id; set => Id = value; }
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string BonusData { get; set; } = "[]";
|
||||
}
|
||||
24
SVSim.Database/Models/DefaultDeckEntry.cs
Normal file
24
SVSim.Database/Models/DefaultDeckEntry.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Starter / "use default" deck definition from /deck/info data.default_deck_list.
|
||||
/// CardIdArray is the wire's int[] of 40 card_id values; stored as jsonb to keep it array-shaped.
|
||||
/// </summary>
|
||||
public class DefaultDeckEntry : BaseEntity<int>
|
||||
{
|
||||
public int DeckNo { get => Id; set => Id = value; }
|
||||
|
||||
public int ClassId { get; set; }
|
||||
|
||||
public long SleeveId { get; set; }
|
||||
|
||||
public int LeaderSkinId { get; set; }
|
||||
|
||||
public string DeckName { get; set; } = string.Empty;
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string CardIdArray { get; set; } = "[]";
|
||||
}
|
||||
13
SVSim.Database/Models/DefaultLeaderSkinSettingEntry.cs
Normal file
13
SVSim.Database/Models/DefaultLeaderSkinSettingEntry.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>One row per class: which leader skin is default and whether random rotation is on.</summary>
|
||||
public class DefaultLeaderSkinSettingEntry : BaseEntity<int>
|
||||
{
|
||||
public int ClassId { get => Id; set => Id = value; }
|
||||
|
||||
public int IsRandomLeaderSkin { get; set; }
|
||||
|
||||
public int LeaderSkinId { get; set; }
|
||||
}
|
||||
16
SVSim.Database/Models/FeatureMaintenanceEntry.cs
Normal file
16
SVSim.Database/Models/FeatureMaintenanceEntry.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Per-feature maintenance toggle from /load/index data.feature_maintenance_list. Empty in current
|
||||
/// prod capture; recapture target if a feature ever gets disabled before EOS.
|
||||
/// </summary>
|
||||
public class FeatureMaintenanceEntry : BaseEntity<int>
|
||||
{
|
||||
public string FeatureKey { get; set; } = string.Empty;
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string Data { get; set; } = "{}";
|
||||
}
|
||||
@@ -9,9 +9,30 @@ public class GameConfiguration : BaseEntity<string>
|
||||
public ulong DefaultRupees { get; set; }
|
||||
|
||||
public ulong DefaultEther { get; set; }
|
||||
|
||||
|
||||
public int MaxFriends { get; set; }
|
||||
|
||||
#region Time-varying globals populated by SVSim.Bootstrap.GlobalsImporter
|
||||
|
||||
/// <summary>Current "Take Two Special" rotation ID, e.g. "10015". Points into MyRotationSettingEntry.</summary>
|
||||
public string TsRotationId { get; set; } = string.Empty;
|
||||
|
||||
public bool ChallengeUseTwoPickPremiumCard { get; set; }
|
||||
|
||||
public long ChallengeTwoPickSleeveId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Bool on the wire (prod sends true/false); local previously sent int. Fixes the
|
||||
/// type-mismatch noted in seed-data-strategy-2026-05-23.md crash audit.
|
||||
/// </summary>
|
||||
public bool IsBattlePassPeriod { get; set; }
|
||||
|
||||
public bool IsBeginnerMission { get; set; }
|
||||
|
||||
public int CardSetIdForResourceDlView { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Foreign Keys
|
||||
|
||||
public int DefaultDegreeId { get; set; }
|
||||
|
||||
12
SVSim.Database/Models/LoadingExclusionCardEntry.cs
Normal file
12
SVSim.Database/Models/LoadingExclusionCardEntry.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Cards excluded from loading-screen art rotation, from /load/index data.loading_exclusion_card_list.
|
||||
/// References ShadowverseCardEntry.Id but no FK.
|
||||
/// </summary>
|
||||
public class LoadingExclusionCardEntry : BaseEntity<long>
|
||||
{
|
||||
public long CardId { get => Id; set => Id = value; }
|
||||
}
|
||||
12
SVSim.Database/Models/MaintenanceCardEntry.cs
Normal file
12
SVSim.Database/Models/MaintenanceCardEntry.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Cards disabled mid-season for emergency balance, from /load/index data.maintenance_card_list.
|
||||
/// Empty in current prod capture; recapture target if a card ever gets emergency-disabled before EOS.
|
||||
/// </summary>
|
||||
public class MaintenanceCardEntry : BaseEntity<long>
|
||||
{
|
||||
public long CardId { get => Id; set => Id = value; }
|
||||
}
|
||||
18
SVSim.Database/Models/MasterPointRankingPeriodEntry.cs
Normal file
18
SVSim.Database/Models/MasterPointRankingPeriodEntry.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Monthly Master Point ranking window from /mypage/index data.master_point_ranking_period.
|
||||
/// One row per period; the "current" period is fetched by EndTime > now ordering.
|
||||
/// </summary>
|
||||
public class MasterPointRankingPeriodEntry : BaseEntity<int>
|
||||
{
|
||||
public int PeriodNum { get; set; }
|
||||
|
||||
public long NecessaryScore { get; set; }
|
||||
|
||||
public DateTime BeginTime { get; set; }
|
||||
|
||||
public DateTime EndTime { get; set; }
|
||||
}
|
||||
13
SVSim.Database/Models/MyRotationAbilityEntry.cs
Normal file
13
SVSim.Database/Models/MyRotationAbilityEntry.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
public class MyRotationAbilityEntry : BaseEntity<int>
|
||||
{
|
||||
public int AbilityId { get => Id; set => Id = value; }
|
||||
|
||||
/// <summary>Raw ability blob from /load/index data.my_rotation_info.abilities[abilityId].</summary>
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string Data { get; set; } = "{}";
|
||||
}
|
||||
24
SVSim.Database/Models/MyRotationSettingEntry.cs
Normal file
24
SVSim.Database/Models/MyRotationSettingEntry.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Joins /load/index data.my_rotation_info.{setting, reprinted_base_card_ids, restricted_base_card_id_list}
|
||||
/// on rotation_id. CardSetIdsCsv and AbilitiesCsv mirror the wire's pipe-delimited string format
|
||||
/// (e.g. "10000|10001|10002"); the importer keeps them verbatim.
|
||||
/// </summary>
|
||||
public class MyRotationSettingEntry : BaseEntity<int>
|
||||
{
|
||||
public int RotationId { get => Id; set => Id = value; }
|
||||
|
||||
public string CardSetIdsCsv { get; set; } = string.Empty;
|
||||
|
||||
public string AbilitiesCsv { get; set; } = string.Empty;
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string ReprintedCardIds { get; set; } = "[]";
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string RestrictedCardIds { get; set; } = "[]";
|
||||
}
|
||||
41
SVSim.Database/Models/PreReleaseInfo.cs
Normal file
41
SVSim.Database/Models/PreReleaseInfo.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Singleton row (Id=1) for upcoming card-set pre-release window from /load/index data.pre_release_info.
|
||||
/// Current capture has stale 1900/2019/2020 dates — likely "no active pre-release" sentinel.
|
||||
/// Recapture target during an active pre-release window (typically a week before each new expansion).
|
||||
/// </summary>
|
||||
public class PreReleaseInfo : BaseEntity<int>
|
||||
{
|
||||
public string PreReleaseId { get; set; } = string.Empty;
|
||||
|
||||
public string NextCardSetId { get; set; } = string.Empty;
|
||||
|
||||
public DateTime StartTime { get; set; }
|
||||
|
||||
public DateTime EndTime { get; set; }
|
||||
|
||||
public DateTime DisplayEndTime { get; set; }
|
||||
|
||||
public DateTime FreeMatchStartTime { get; set; }
|
||||
|
||||
public int CardMasterId { get; set; }
|
||||
|
||||
public string DefaultCardMasterId { get; set; } = string.Empty;
|
||||
|
||||
public string PreReleaseCardMasterId { get; set; } = string.Empty;
|
||||
|
||||
public bool IsPreRotationFreeMatchTerm { get; set; }
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string RotationCardSetIdList { get; set; } = "[]";
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string ReprintedBaseCardIds { get; set; } = "{}";
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string LatestReprintedBaseCardIds { get; set; } = "{}";
|
||||
}
|
||||
12
SVSim.Database/Models/ReprintedCardEntry.cs
Normal file
12
SVSim.Database/Models/ReprintedCardEntry.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Cards currently in the reprinted list from /load/index data.reprinted_base_card_ids.
|
||||
/// References ShadowverseCardEntry.Id but no FK.
|
||||
/// </summary>
|
||||
public class ReprintedCardEntry : BaseEntity<long>
|
||||
{
|
||||
public long CardId { get => Id; set => Id = value; }
|
||||
}
|
||||
33
SVSim.Database/Models/SealedConfig.cs
Normal file
33
SVSim.Database/Models/SealedConfig.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Singleton row (Id=1) for the current Sealed Arena season from /mypage/index data.sealed_info.
|
||||
/// PackInfo jsonb is the int[] of pack set IDs used in the pool.
|
||||
/// </summary>
|
||||
public class SealedConfig : BaseEntity<int>
|
||||
{
|
||||
public int Enable { get; set; }
|
||||
|
||||
public int CrystalCost { get; set; }
|
||||
|
||||
public int RupyCost { get; set; }
|
||||
|
||||
public int TicketCost { get; set; }
|
||||
|
||||
public int DeckUsingNumMin { get; set; }
|
||||
|
||||
public int ScheduleId { get; set; }
|
||||
|
||||
public bool IsJoin { get; set; }
|
||||
|
||||
public bool IsDeckCodeMaintenance { get; set; }
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string PackInfo { get; set; } = "[]";
|
||||
|
||||
[Column(TypeName = "jsonb")]
|
||||
public string SalesPeriodInfo { get; set; } = "{}";
|
||||
}
|
||||
14
SVSim.Database/Models/SpotCardEntry.cs
Normal file
14
SVSim.Database/Models/SpotCardEntry.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// One row per rentable "spot card" from /load/index data.spot_cards (dict {card_id: cost}).
|
||||
/// References ShadowverseCardEntry.Id but no FK — bootstrap warns on orphans.
|
||||
/// </summary>
|
||||
public class SpotCardEntry : BaseEntity<long>
|
||||
{
|
||||
public long CardId { get => Id; set => Id = value; }
|
||||
|
||||
public int Cost { get; set; }
|
||||
}
|
||||
15
SVSim.Database/Models/UnlimitedRestrictionEntry.cs
Normal file
15
SVSim.Database/Models/UnlimitedRestrictionEntry.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using SVSim.Database.Common;
|
||||
|
||||
namespace SVSim.Database.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Per-card unlimited-format ban/limit value from /load/index data.unlimited_restricted_base_card_id_list
|
||||
/// (dict {card_id: restriction_value}). RestrictionValue semantics TBD — prod observed {0, 1}; the audit
|
||||
/// flags this as "0 = limit-1? 1 = hard-ban?" pending a client read.
|
||||
/// </summary>
|
||||
public class UnlimitedRestrictionEntry : BaseEntity<long>
|
||||
{
|
||||
public long CardId { get => Id; set => Id = value; }
|
||||
|
||||
public int RestrictionValue { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user