namespace Theriapolis.Core.Persistence.SaveMigrations;

/// <summary>
/// Phase 6 M2 — additive migration from save schema v5 (Phase 5 ship) to
/// v6 (Phase 6 reputation core). Non-destructive: every v5 field carries
/// over unchanged. The new <see cref="SaveBody.ReputationState"/> is
/// already initialised to a fresh empty <see cref="ReputationSnapshot"/>
/// by the SaveBody constructor, so this migration just bumps the header
/// version.
///
/// Phase 5's placeholder <see cref="SaveBody.Factions"/> and
/// <see cref="SaveBody.Reputation"/> dictionaries were never populated
/// (Phase 5 didn't ship the reputation system), so we don't need to
/// translate any data — they stay empty and ignored.
/// </summary>
public sealed class V5ToV6Migration : ISaveMigration
{
    public int FromVersion => 5;
    public int ToVersion   => 6;

    public void Apply(SaveHeader header, SaveBody body)
    {
        // Body fields all default-initialise to empty in SaveBody — the
        // ReputationState is already a fresh ReputationSnapshot. Phase-5
        // saves had nothing to translate, so this is a pure version bump.
    }
}
