using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using SVSim.Database.Common; namespace SVSim.Database.Models; /// /// One row per top-level game-config section. matches the /// ConfigSectionAttribute.Name on the corresponding POCO in Models.Config /// (e.g. "PackRates"PackRateConfig). is the section's /// payload, stored as jsonb on Postgres and TEXT on SQLite. /// /// Deserialisation goes through pure System.Text.Json in IGameConfigService — EF doesn't /// know about the section POCOs. Replaces the old single-row GameConfigurations table /// (one wide jsonb document, EF Core 8 OwnsOne+ToJson tree). See ADR-pending / /// 2026-05-24 config-refactor discussion for the why. /// /// public class GameConfigSection : ITimeTrackedEntity { [Key] [DatabaseGenerated(DatabaseGeneratedOption.None)] public string SectionName { get; set; } = ""; /// Raw JSON payload for this section. Postgres stores as jsonb; SQLite as TEXT. public string ValueJson { get; set; } = "{}"; public DateTime DateCreated { get; set; } = DateTime.MinValue; public DateTime? DateUpdated { get; set; } }