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
@@ -53,37 +53,172 @@ namespace FinlyticSentiment.Migrations
b.ToTable("DynamicSettings");
});
modelBuilder.Entity("FinlyticSentiment.Entities.SentimentSettingsEntity", b =>
modelBuilder.Entity("FinlyticSentiment.Entities.ArticleSentimentEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("EnglishWebhookUrl")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<DateTime>("AnalyzedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("GermanWebhookUrl")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<Guid>("ArticleId")
.HasColumnType("uuid");
b.Property<int>("MaxBatchSize")
.HasColumnType("integer");
b.Property<double>("MinConfidenceScore")
b.Property<double>("CompoundScore")
.HasColumnType("double precision");
b.Property<int>("SweepIntervalMinutes")
.HasColumnType("integer");
b.Property<double>("Confidence")
.HasColumnType("double precision");
b.Property<DateTime>("UpdatedAt")
b.Property<string>("Impact")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("Isin")
.IsRequired()
.HasMaxLength(12)
.HasColumnType("character varying(12)");
b.Property<string>("KeyHighlight")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property<string>("Label")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<double>("NegativeProbability")
.HasColumnType("double precision");
b.Property<double>("NeutralProbability")
.HasColumnType("double precision");
b.Property<double>("PositiveProbability")
.HasColumnType("double precision");
b.Property<DateTime>("PublishedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("Sector")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.HasKey("Id");
b.ToTable("sentiment_settings", (string)null);
b.HasIndex("AnalyzedAtUtc");
b.HasIndex("Sector");
b.HasIndex("ArticleId", "Isin")
.IsUnique();
b.HasIndex("Isin", "PublishedAtUtc");
b.ToTable("article_sentiments");
});
modelBuilder.Entity("FinlyticSentiment.Entities.CompanySentimentSummaryEntity", b =>
{
b.Property<string>("Isin")
.HasMaxLength(12)
.HasColumnType("character varying(12)");
b.Property<double>("AverageConfidence")
.HasColumnType("double precision");
b.Property<double>("AverageScore")
.HasColumnType("double precision");
b.Property<string>("CurrentLabel")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<DateTime>("LastUpdatedUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("LatestKeyHighlight")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<int>("NegativeCount")
.HasColumnType("integer");
b.Property<int>("NeutralCount")
.HasColumnType("integer");
b.Property<int>("PositiveCount")
.HasColumnType("integer");
b.Property<string>("Sector")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<int>("TotalAnalysesCount")
.HasColumnType("integer");
b.Property<string>("Trend")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<long>("Version")
.IsConcurrencyToken()
.HasColumnType("bigint");
b.Property<double>("WeightedScore")
.HasColumnType("double precision");
b.HasKey("Isin");
b.HasIndex("LastUpdatedUtc");
b.HasIndex("Sector");
b.HasIndex("WeightedScore");
b.ToTable("company_sentiment_summaries");
});
modelBuilder.Entity("FinlyticSentiment.Entities.SectorSentimentSummaryEntity", b =>
{
b.Property<string>("Sector")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<double>("AverageScore")
.HasColumnType("double precision");
b.Property<string>("CurrentLabel")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<DateTime>("LastUpdatedUtc")
.HasColumnType("timestamp with time zone");
b.Property<int>("TotalArticlesCount")
.HasColumnType("integer");
b.Property<int>("TotalCompaniesCount")
.HasColumnType("integer");
b.HasKey("Sector");
b.HasIndex("LastUpdatedUtc");
b.ToTable("sector_sentiment_summaries");
});
#pragma warning restore 612, 618
}