using System.Text.Json.Serialization; using FinlyticCore.Dtos.Sentiment; namespace FinlyticCore.Dtos.News; /// /// Data transfer object representing a parsed and enriched news article with bundled sentiment metrics. /// public record NewsArticleDto { /// /// Gets or sets the unique article identifier. /// [JsonPropertyName("id")] public Guid Id { get; init; } /// /// Gets or sets the title of the article. /// [JsonPropertyName("title")] public string Title { get; init; } = string.Empty; /// /// Gets or sets the author of the article. /// [JsonPropertyName("author")] public string? Author { get; init; } /// /// Gets or sets a brief summary of the article content. /// [JsonPropertyName("summary")] public string? Summary { get; init; } /// /// Gets or sets the raw extracted text content of the article. /// [JsonPropertyName("contentRaw")] public string ContentRaw { get; init; } = string.Empty; /// /// Gets or sets the language of the article (e.g. "en", "de"). /// [JsonPropertyName("language")] public string? Language { get; init; } /// /// Gets or sets the unique source URL of the article. /// [JsonPropertyName("sourceUrl")] public string SourceUrl { get; init; } = string.Empty; /// /// Gets or sets the timestamp when the article was scraped. /// [JsonPropertyName("scrapedAt")] public DateTime ScrapedAt { get; init; } /// /// Gets or sets the publication timestamp of the article. /// [JsonPropertyName("publishedAt")] public DateTime PublishedAt { get; init; } /// /// Gets or sets the list of classified assets referenced in the article. /// [JsonPropertyName("matchedAssets")] public List MatchedAssets { get; init; } = []; /// /// Gets or sets the processing lifecycle state (e.g. "Pending", "Completed", "Analyzed"). /// [JsonPropertyName("status")] public string Status { get; init; } = "Completed"; /// /// Gets or sets the classified sentiment label ("POSITIVE", "NEGATIVE", "NEUTRAL"). /// [JsonPropertyName("sentiment")] public string? Sentiment { get; init; } /// /// Gets or sets the compound sentiment score (-1.0 to +1.0). /// [JsonPropertyName("sentimentScore")] public double? SentimentScore { get; init; } /// /// Gets or sets the FinBERT classification confidence score (0.0 to 1.0). /// [JsonPropertyName("confidence")] public double? Confidence { get; init; } /// /// Gets or sets the detailed FinBERT result breakdown. /// [JsonPropertyName("finbertResult")] public FinBertResultDto? FinbertResult { get; init; } }