using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; namespace FinlyticFundamentals.Entities; /// /// Main database table representing global company profile, ownership structure, analyst predictions, and corporate events. /// public class AssetFundamentalsEntity { [Key] [Required] public string Isin { get; set; } = string.Empty; [Required] public string PrimaryTicker { get; set; } = string.Empty; // --- Static Company Profile Columns --- [Required] public string CompanyName { get; set; } = string.Empty; public string? BusinessSummary { get; set; } public string? Sector { get; set; } public string? Industry { get; set; } public string? Country { get; set; } public int? Employees { get; set; } // --- Ownership & Sentiment Data (Company-wide) --- public decimal? PercentHeldByInstitutions { get; set; } public decimal? PercentHeldByInsiders { get; set; } public decimal? ShortRatio { get; set; } public decimal? ShortPercentOfFloat { get; set; } // --- Analyst Forecasts & Targets --- public string? ConsensusRating { get; set; } public decimal? PriceTargetLow { get; set; } public decimal? PriceTargetHigh { get; set; } public decimal? PriceTargetMedian { get; set; } public decimal? PriceTargetMean { get; set; } // --- Corporate Calendar / Catalysts --- public DateTime? ExDividendDate { get; set; } public DateTime? NextEarningsDate { get; set; } // --- Cache Control Timestamps --- public DateTime LastUpdatedAt { get; set; } = DateTime.UtcNow; public DateTime LastStaticUpdatedAt { get; set; } = DateTime.UtcNow; // --- Relational Collections --- public List Executives { get; set; } = []; public List FinancialStatements { get; set; } = []; public List Estimates { get; set; } = []; public List TickerFundamentals { get; set; } = []; }