feat(packs): PackDrawTableImporter with fixture tests
Idempotent upsert keyed on pack_id; slot rates and card weights are wiped per pack and reinserted. String slot/tier in the seed translate to enum at import time. Tests: - Imports_config_slot_rates_and_card_weights - Is_idempotent_on_rerun Fixtures live under SVSim.Bootstrap/Data/test-fixtures/seeds/ and overlay the production seeds via the existing csproj rule (test-fixture file beats production file at same Link path). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
[
|
||||
{ "pack_id": 10000, "slot": "general", "tier": "bronze", "card_id": 100, "rate_pct": 50.0, "is_leader": false, "is_alt_art": false },
|
||||
{ "pack_id": 10000, "slot": "general", "tier": "bronze", "card_id": 101, "rate_pct": 26.5, "is_leader": false, "is_alt_art": false },
|
||||
{ "pack_id": 10000, "slot": "general", "tier": "legendary", "card_id": 200, "rate_pct": 1.5, "is_leader": false, "is_alt_art": false },
|
||||
{ "pack_id": 98001, "slot": "bonus", "tier": "special", "card_id": 300, "rate_pct": null, "is_leader": true, "is_alt_art": false },
|
||||
{ "pack_id": 98001, "slot": "bonus", "tier": "special", "card_id": 301, "rate_pct": null, "is_leader": true, "is_alt_art": false }
|
||||
]
|
||||
@@ -0,0 +1,4 @@
|
||||
[
|
||||
{ "pack_id": 10000, "short_code": "Basic", "animation_rate_pct": 8.0, "has_bonus_slot": false, "special_kind": null },
|
||||
{ "pack_id": 98001, "short_code": "98ANV", "animation_rate_pct": 8.0, "has_bonus_slot": true, "special_kind": "leader_card" }
|
||||
]
|
||||
@@ -0,0 +1,10 @@
|
||||
[
|
||||
{ "pack_id": 10000, "slot": "general", "tier": "bronze", "rate_pct": 76.5 },
|
||||
{ "pack_id": 10000, "slot": "general", "tier": "silver", "rate_pct": 16.0 },
|
||||
{ "pack_id": 10000, "slot": "general", "tier": "gold", "rate_pct": 6.0 },
|
||||
{ "pack_id": 10000, "slot": "general", "tier": "legendary", "rate_pct": 1.5 },
|
||||
{ "pack_id": 10000, "slot": "eighth", "tier": "silver", "rate_pct": 92.5 },
|
||||
{ "pack_id": 10000, "slot": "eighth", "tier": "gold", "rate_pct": 6.0 },
|
||||
{ "pack_id": 10000, "slot": "eighth", "tier": "legendary", "rate_pct": 1.5 },
|
||||
{ "pack_id": 98001, "slot": "bonus", "tier": "special", "rate_pct": 100.0 }
|
||||
]
|
||||
Reference in New Issue
Block a user