using System.Collections.Generic; using System.Text.Json.Serialization; namespace FinlyticCore.Dtos.Sentiment; /// /// Article metadata referenced inside an ISIN analysis event. /// public record IsinAnalysisArticleRef { /// /// Gets or sets the article identifier. /// [JsonPropertyName("articleId")] public string ArticleId { get; init; } = string.Empty; /// /// Gets or sets the article title. /// [JsonPropertyName("title")] public string Title { get; init; } = string.Empty; /// /// Gets or sets the article source name. /// [JsonPropertyName("source")] public string Source { get; init; } = string.Empty; /// /// Gets or sets the publication timestamp in ISO-8601 format. /// [JsonPropertyName("publishedAt")] public string PublishedAt { get; init; } = string.Empty; } /// /// Individual chronological analysis entry inside an ISIN summary file. /// public record IsinAnalysisEntry { /// /// Gets or sets the unique analysis ID (e.g. "sent_20260722_001"). /// [JsonPropertyName("analysisId")] public string AnalysisId { get; init; } = string.Empty; /// /// Gets or sets the analysis timestamp in ISO-8601 format. /// [JsonPropertyName("timestamp")] public string Timestamp { get; init; } = string.Empty; /// /// Gets or sets the referenced article details. /// [JsonPropertyName("article")] public IsinAnalysisArticleRef Article { get; init; } = new(); /// /// Gets or sets the FinBERT analysis result. /// [JsonPropertyName("finbertResult")] public FinBertResultDto FinbertResult { get; init; } = new(); /// /// Gets or sets the summary snippet. /// [JsonPropertyName("summarySnippet")] public string SummarySnippet { get; init; } = string.Empty; } /// /// Current summary aggregate header inside an ISIN sentiment summary file. /// public record IsinCurrentSummary { /// /// Gets or sets the average compound score (-1.0 to +1.0). /// [JsonPropertyName("compoundScore")] public double CompoundScore { get; init; } /// /// Gets or sets the overall sentiment label ("POSITIVE", "NEGATIVE", "NEUTRAL"). /// [JsonPropertyName("sentimentLabel")] public string SentimentLabel { get; init; } = "NEUTRAL"; /// /// Gets or sets the average confidence across analyzed articles. /// [JsonPropertyName("avgConfidence")] public double AvgConfidence { get; init; } /// /// Gets or sets the total number of articles analyzed for this ISIN. /// [JsonPropertyName("totalArticlesAnalyzed")] public int TotalArticlesAnalyzed { get; init; } /// /// Gets or sets the number of positive articles. /// [JsonPropertyName("positiveArticles")] public int PositiveArticles { get; init; } /// /// Gets or sets the number of negative articles. /// [JsonPropertyName("negativeArticles")] public int NegativeArticles { get; init; } /// /// Gets or sets the number of neutral articles. /// [JsonPropertyName("neutralArticles")] public int NeutralArticles { get; init; } /// /// Gets or sets the sentiment trend ("IMPROVING", "DETERIORATING", "STABLE"). /// [JsonPropertyName("trend")] public string? Trend { get; init; } /// /// Gets or sets the key highlight summary. /// [JsonPropertyName("keyHighlight")] public string? KeyHighlight { get; init; } /// /// Gets or sets the overall synthesized sentiment text overview. /// [JsonPropertyName("text")] public string Text { get; init; } = string.Empty; } /// /// Data transfer object for an ISIN sentiment summary file. /// public record IsinSentimentSummaryDto { /// /// Gets or sets the ISIN code. /// [JsonPropertyName("isin")] public string Isin { get; init; } = string.Empty; /// /// Gets or sets the company name. /// [JsonPropertyName("companyName")] public string CompanyName { get; init; } = string.Empty; /// /// Gets or sets the sector name. /// [JsonPropertyName("sector")] public string Sector { get; init; } = string.Empty; /// /// Gets or sets the last updated timestamp in ISO-8601 format. /// [JsonPropertyName("lastUpdated")] public string LastUpdated { get; init; } = string.Empty; /// /// Gets or sets the current summary metrics and overview. /// [JsonPropertyName("currentSummary")] public IsinCurrentSummary CurrentSummary { get; init; } = new(); /// /// Gets or sets the list of historical analysis entries. /// [JsonPropertyName("analyses")] public List Analyses { get; init; } = []; }