feat(Core): update DTOs and shared models

This commit is contained in:
2026-08-09 21:01:38 +02:00
parent 6337e63a77
commit 5475c3ac51
58 changed files with 3418 additions and 30 deletions
+101
View File
@@ -0,0 +1,101 @@
using System.Text.Json.Serialization;
using FinlyticCore.Dtos.Sentiment;
namespace FinlyticCore.Dtos.News;
/// <summary>
/// Data transfer object representing a parsed and enriched news article with bundled sentiment metrics.
/// </summary>
public record NewsArticleDto
{
/// <summary>
/// Gets or sets the unique article identifier.
/// </summary>
[JsonPropertyName("id")]
public Guid Id { get; init; }
/// <summary>
/// Gets or sets the title of the article.
/// </summary>
[JsonPropertyName("title")]
public string Title { get; init; } = string.Empty;
/// <summary>
/// Gets or sets the author of the article.
/// </summary>
[JsonPropertyName("author")]
public string? Author { get; init; }
/// <summary>
/// Gets or sets a brief summary of the article content.
/// </summary>
[JsonPropertyName("summary")]
public string? Summary { get; init; }
/// <summary>
/// Gets or sets the raw extracted text content of the article.
/// </summary>
[JsonPropertyName("contentRaw")]
public string ContentRaw { get; init; } = string.Empty;
/// <summary>
/// Gets or sets the language of the article (e.g. "en", "de").
/// </summary>
[JsonPropertyName("language")]
public string? Language { get; init; }
/// <summary>
/// Gets or sets the unique source URL of the article.
/// </summary>
[JsonPropertyName("sourceUrl")]
public string SourceUrl { get; init; } = string.Empty;
/// <summary>
/// Gets or sets the timestamp when the article was scraped.
/// </summary>
[JsonPropertyName("scrapedAt")]
public DateTime ScrapedAt { get; init; }
/// <summary>
/// Gets or sets the publication timestamp of the article.
/// </summary>
[JsonPropertyName("publishedAt")]
public DateTime PublishedAt { get; init; }
/// <summary>
/// Gets or sets the list of classified assets referenced in the article.
/// </summary>
[JsonPropertyName("matchedAssets")]
public List<MatchedAssetDto> MatchedAssets { get; init; } = [];
/// <summary>
/// Gets or sets the processing lifecycle state (e.g. "Pending", "Completed", "Analyzed").
/// </summary>
[JsonPropertyName("status")]
public string Status { get; init; } = "Completed";
/// <summary>
/// Gets or sets the classified sentiment label ("POSITIVE", "NEGATIVE", "NEUTRAL").
/// </summary>
[JsonPropertyName("sentiment")]
public string? Sentiment { get; init; }
/// <summary>
/// Gets or sets the compound sentiment score (-1.0 to +1.0).
/// </summary>
[JsonPropertyName("sentimentScore")]
public double? SentimentScore { get; init; }
/// <summary>
/// Gets or sets the FinBERT classification confidence score (0.0 to 1.0).
/// </summary>
[JsonPropertyName("confidence")]
public double? Confidence { get; init; }
/// <summary>
/// Gets or sets the detailed FinBERT result breakdown.
/// </summary>
[JsonPropertyName("finbertResult")]
public FinBertResultDto? FinbertResult { get; init; }
}