feat(sentiment): add persistent sentiment entities, summaries, SentimentDbService and MQTT RPC refactoring

This commit is contained in:
2026-08-24 21:35:48 +02:00
parent 600ccf299e
commit 12e7b57b16
24 changed files with 1510 additions and 1300 deletions
@@ -0,0 +1,53 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace FinlyticSentiment.Entities;
/// <summary>
/// Entity representing a single sentiment evaluation of an asset mentioned in a news article.
/// </summary>
[Table("article_sentiments")]
public class ArticleSentimentEntity
{
[Key]
public Guid Id { get; set; } = Guid.NewGuid();
[Required]
public Guid ArticleId { get; set; }
[Required]
[MaxLength(12)]
public string Isin { get; set; } = string.Empty;
[Required]
[MaxLength(256)]
public string Name { get; set; } = string.Empty;
[MaxLength(128)]
public string? Sector { get; set; }
[Required]
[MaxLength(32)]
public string Label { get; set; } = "NEUTRAL";
public double CompoundScore { get; set; }
public double Confidence { get; set; }
[MaxLength(32)]
public string? Impact { get; set; }
public double PositiveProbability { get; set; }
public double NegativeProbability { get; set; }
public double NeutralProbability { get; set; }
[MaxLength(1024)]
public string? KeyHighlight { get; set; }
public DateTime PublishedAtUtc { get; set; }
public DateTime AnalyzedAtUtc { get; set; } = DateTime.UtcNow;
}