feat(missions): ViewerMissionStateService — lazy materialize achievements + assign slots
Reads existing state from DB on each call (don't trust navigation property — caller may pass it stale or double-tracked). Adds via DbSet only, not via navigation property, to avoid EF double-tracking. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
using SVSim.Database.Models;
|
||||
|
||||
namespace SVSim.EmulatedEntrypoint.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Lazy-initializes viewer mission/achievement state. Idempotent. Called from
|
||||
/// LoadController on every /load/index and as belt-and-braces from /mission/info.
|
||||
/// </summary>
|
||||
public interface IViewerMissionStateService
|
||||
{
|
||||
Task EnsureCurrentAsync(Viewer viewer, CancellationToken ct = default);
|
||||
}
|
||||
Reference in New Issue
Block a user