Stage 9B of the bootstrap-seed-refactor: add per-domain importer classes that consume the load-index seed split produced in Stage 9A. New importers (each in its own file under SVSim.Bootstrap/Importers/): - RotationConfigImporter: writes Rotation/Challenge/MyRotationSchedule GameConfig sections (atomic UpsertSection<T> pattern, copied private-static from GlobalsImporter so this importer stands alone post-9C). - MyRotationImporter: settings + abilities (extractor pre-joins on rotation_id). - AvatarAbilityImporter: per-leader_skin_id ability rows. - ArenaSeasonImporter: singleton (Id=1) Take Two arena season. - BattlePassImporter: per-level reward blobs. - DailyLoginBonusImporter: per-bonus-id campaign blobs. - PreReleaseInfoImporter: singleton (Id=1) pre-release window. Seed DTOs under SVSim.Bootstrap/Models/Seed/ mirror the seed JSON via [JsonPropertyName] snake_case. Raw-JSON columns (reward_data, format_info, etc.) use JsonElement on the seed and JsonSerializer.Serialize in the importer. Tests: 7 new happy-path tests in LoadIndexImporterTests.cs (idempotency covered by BattlePass spot-check). Full suite: 382/382 passing (375 + 7). NOT modifying in this stage: GlobalsImporter.cs (Stage 9C strips the old methods), Program.cs (Stage 9C wires up all 9 importers), SVSimTestFactory (Stage 9C). Double-writing on bootstrap is expected and OK during 9B.
21 lines
913 B
C#
21 lines
913 B
C#
using System.Text.Json;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace SVSim.Bootstrap.Models.Seed;
|
|
|
|
/// <summary>
|
|
/// Mirrors <c>seeds/arena-season.json</c>. Singleton (id=1) holding the Take Two arena season.
|
|
/// <c>format_info</c> is a nested JSON object stored verbatim as the entity's <c>FormatInfo</c> jsonb.
|
|
/// </summary>
|
|
public sealed class ArenaSeasonSeed
|
|
{
|
|
[JsonPropertyName("id")] public int Id { get; set; }
|
|
[JsonPropertyName("mode")] public int Mode { get; set; }
|
|
[JsonPropertyName("enable")] public int Enable { get; set; }
|
|
[JsonPropertyName("cost")] public ulong Cost { get; set; }
|
|
[JsonPropertyName("rupy_cost")] public ulong RupyCost { get; set; }
|
|
[JsonPropertyName("ticket_cost")] public int TicketCost { get; set; }
|
|
[JsonPropertyName("is_join")] public bool IsJoin { get; set; }
|
|
[JsonPropertyName("format_info")] public JsonElement FormatInfo { get; set; }
|
|
}
|