refactor(pack): migrate PackController to IGameCalendarService

Swaps all four DateTime.UtcNow.Date same-day checks in PackController for
_calendar.ResetReady() — daily-single open, /pack/info daily-single gate,
FreePacks /pack/info visibility, FreePacks /pack/open quota. Removes the
TODO(daily-reset) comments; ToDto promoted from static to instance so it
can see _calendar.

Also fills in GameCalendarConfig.ShippedDefaults() (required by the
[ConfigSection] discovery in SVSimDbContext.EnsureSeedDataAsync — bootstrap
throws without it).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-07-04 11:49:17 -04:00
parent 90d420d97a
commit a6b2c47b98
2 changed files with 14 additions and 15 deletions

View File

@@ -15,4 +15,6 @@ public class GameCalendarConfig
/// WeekKey / MonthKey — treat as a startup constant in production.
/// </summary>
public int DailyResetUtcHour { get; set; } = 0;
public static GameCalendarConfig ShippedDefaults() => new();
}