feat(core): add shared DTOs, MqttTopics constants, DatabaseBootstrapper, and ManagedMqttClient extensions

This commit is contained in:
2026-08-24 21:35:24 +02:00
parent 6ab84fe1de
commit 44b161d509
39 changed files with 2545 additions and 709 deletions
@@ -40,7 +40,7 @@ public record FinBertResultDto
/// <summary>
/// Gets or sets the compound score (-1.0 to +1.0).
/// </summary>
[JsonPropertyName("compoundScore")]
[JsonPropertyName("compound_score")]
public double CompoundScore { get; init; }
/// <summary>
@@ -49,6 +49,12 @@ public record FinBertResultDto
[JsonPropertyName("confidence")]
public double Confidence { get; init; }
/// <summary>
/// Gets or sets the estimated market impact ("HIGH", "MEDIUM", "LOW").
/// </summary>
[JsonPropertyName("impact")]
public string? Impact { get; init; }
/// <summary>
/// Gets or sets the probability breakdown.
/// </summary>
@@ -56,8 +62,14 @@ public record FinBertResultDto
public FinBertProbabilities Probabilities { get; init; } = new();
/// <summary>
/// Gets or sets the short summary snippet highlighting the impact of the article.
/// Gets or sets the short key highlight extracted by FinBERT / n8n.
/// </summary>
[JsonPropertyName("key_highlight")]
public string? KeyHighlight { get; init; }
/// <summary>
/// Legacy alias for KeyHighlight / summary snippet.
/// </summary>
[JsonPropertyName("summarySnippet")]
public string? SummarySnippet { get; init; }
public string? SummarySnippet => KeyHighlight;
}
@@ -1,3 +1,4 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace FinlyticCore.Dtos.Sentiment;
@@ -97,6 +98,36 @@ public record IsinCurrentSummary
[JsonPropertyName("totalArticlesAnalyzed")]
public int TotalArticlesAnalyzed { get; init; }
/// <summary>
/// Gets or sets the number of positive articles.
/// </summary>
[JsonPropertyName("positiveArticles")]
public int PositiveArticles { get; init; }
/// <summary>
/// Gets or sets the number of negative articles.
/// </summary>
[JsonPropertyName("negativeArticles")]
public int NegativeArticles { get; init; }
/// <summary>
/// Gets or sets the number of neutral articles.
/// </summary>
[JsonPropertyName("neutralArticles")]
public int NeutralArticles { get; init; }
/// <summary>
/// Gets or sets the sentiment trend ("IMPROVING", "DETERIORATING", "STABLE").
/// </summary>
[JsonPropertyName("trend")]
public string? Trend { get; init; }
/// <summary>
/// Gets or sets the key highlight summary.
/// </summary>
[JsonPropertyName("keyHighlight")]
public string? KeyHighlight { get; init; }
/// <summary>
/// Gets or sets the overall synthesized sentiment text overview.
/// </summary>
@@ -105,7 +136,7 @@ public record IsinCurrentSummary
}
/// <summary>
/// Data transfer object for an ISIN sentiment summary file (stored in data/summaries/isin/ISIN.json).
/// Data transfer object for an ISIN sentiment summary file.
/// </summary>
public record IsinSentimentSummaryDto
{
@@ -1,3 +1,4 @@
using System.Collections.Generic;
using System.Text.Json.Serialization;
namespace FinlyticCore.Dtos.Sentiment;
@@ -55,6 +56,18 @@ public record SectorCurrentSummary
[JsonPropertyName("sentimentLabel")]
public string SentimentLabel { get; init; } = "NEUTRAL";
/// <summary>
/// Gets or sets the total number of articles analyzed for this sector.
/// </summary>
[JsonPropertyName("totalArticlesAnalyzed")]
public int TotalArticlesAnalyzed { get; init; }
/// <summary>
/// Gets or sets the total number of distinct companies in this sector.
/// </summary>
[JsonPropertyName("totalCompanies")]
public int TotalCompanies { get; init; }
/// <summary>
/// Gets or sets the list of active asset ISINs influencing the sector.
/// </summary>
@@ -69,7 +82,7 @@ public record SectorCurrentSummary
}
/// <summary>
/// Data transfer object for a Sector sentiment summary file (stored in data/summaries/sectors/SectorName.json).
/// Data transfer object for a Sector sentiment summary file.
/// </summary>
public record SectorSentimentSummaryDto
{