using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace FinlyticFundamentals.Entities; /// /// Database table representing dynamic trading data, exchange-dependent valuation ratios, liquidity, and leverage stats for each traded ticker symbol. /// public class TickerFundamentalsEntity { [Key] [Required] public string Ticker { get; set; } = string.Empty; // Primary key, e.g., "POR.DE" [Required] public string Isin { get; set; } = string.Empty; [ForeignKey("Isin")] public AssetFundamentalsEntity? AssetFundamentals { get; set; } public string? Exchange { get; set; } public string? TradingCurrency { get; set; } // Real-time & Price Performance public decimal CurrentPrice { get; set; } public decimal DayChangeAbsolute { get; set; } public decimal DayChangePercent { get; set; } public decimal FiftyTwoWeekHigh { get; set; } public decimal FiftyTwoWeekLow { get; set; } // Size & Enterprise Valuation public decimal MarketCapitalization { get; set; } public decimal EnterpriseValue { get; set; } // Valuation Ratios public decimal? PeRatioTrailing { get; set; } public decimal? PeRatioForward { get; set; } public decimal? PegRatio { get; set; } public decimal? PbRatio { get; set; } public decimal? PsRatio { get; set; } public decimal? EvToEbitda { get; set; } public decimal? EvToRevenue { get; set; } // Profitability & Return Ratios public decimal? GrossMargin { get; set; } public decimal? OperatingMargin { get; set; } public decimal? NetProfitMargin { get; set; } public decimal? ReturnOnEquity { get; set; } public decimal? ReturnOnAssets { get; set; } public decimal? ReturnOnInvestedCapital { get; set; } // Financial Health, Solvency & Liquidity public decimal? DebtToEquity { get; set; } public decimal? CurrentRatio { get; set; } public decimal? QuickRatio { get; set; } public decimal? InterestCoverage { get; set; } // Dividend Performance Metrics public decimal? DividendYield { get; set; } public decimal? PayoutRatio { get; set; } public DateTime? ExDividendDate { get; set; } public DateTime LastUpdatedAt { get; set; } = DateTime.UtcNow; }