using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace FinlyticTechnicals.Entities; /// /// Persisted backing store for TechnicalUniverseManager's continuously-scanned asset universe (one row /// per monitored ISIN). Deliberately NOT meant to survive a service restart - Program.cs clears this /// table on every startup, since the universe is fully rebuilt within minutes from /// RefreshFavoritesAsync/RefreshDiscoveryAsync and fresh sentiment-spike events, and a stale row /// that never got TTL-swept because the process was down is worse than starting from an empty universe. /// [Table("fta_monitored_universe_assets")] public class FtaMonitoredUniverseAssetEntity { [Key] [MaxLength(20)] public string Isin { get; set; } = string.Empty; [MaxLength(30)] public string? Symbol { get; set; } /// String form of FinlyticCore.Dtos.TechnicalAnalysis.UniverseSource. [Required] [MaxLength(20)] public string Source { get; set; } = string.Empty; /// Lower value = higher scan priority (SentimentSpike=1, UserFavorite=2, Discovery=3). public int Priority { get; set; } [Required] public DateTime AddedAtUtc { get; set; } = DateTime.UtcNow; /// for favorites/discovery entries, which never expire by TTL. public DateTime? ExpiresAtUtc { get; set; } }