using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace FinlyticCore.Entities.Settings; public class SettingEntity { [Key] public Guid Id { get; set; } = Guid.NewGuid(); /// /// Der eindeutige Schlüssel der Einstellung (z.B. "EnableTickerLog" oder "YahooClient.Timeout"). /// [Required] [MaxLength(150)] public string Key { get; set; } = string.Empty; /// /// Der Wert als JSON-String serialisiert. /// Erlaubt bool, int, string, Enums oder komplexe Objekte. /// [Required] [Column(TypeName = "text")] public string ValueJson { get; set; } = string.Empty; /// /// Optional: Ermöglicht instanz- oder servicespezifische Settings. /// "Global" = gilt für alle, "FundamentalService_Inst1" = spezifisch. /// [MaxLength(100)] public string ServiceIdentifier { get; set; } = "Global"; public DateTime LastUpdatedUtc { get; set; } = DateTime.UtcNow; }