feat(sentiment): add persistent sentiment entities, summaries, SentimentDbService and MQTT RPC refactoring
This commit is contained in:
@@ -0,0 +1,229 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using FinlyticSentiment.Database;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FinlyticSentiment.Migrations
|
||||
{
|
||||
[DbContext(typeof(SentimentDbContext))]
|
||||
[Migration("20260818202351_Init")]
|
||||
partial class Init
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.HasAnnotation("ProductVersion", "10.0.9")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 63);
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("FinlyticCore.Entities.Settings.SettingEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<string>("Key")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("character varying(150)");
|
||||
|
||||
b.Property<DateTime>("LastUpdatedUtc")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<string>("ServiceIdentifier")
|
||||
.IsRequired()
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("character varying(100)");
|
||||
|
||||
b.Property<string>("ValueJson")
|
||||
.IsRequired()
|
||||
.HasColumnType("text");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("Key")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("DynamicSettings");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("FinlyticSentiment.Entities.ArticleSentimentEntity", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<DateTime>("AnalyzedAtUtc")
|
||||
.HasColumnType("timestamp with time zone");
|
||||
|
||||
b.Property<Guid>("ArticleId")
|
||||
.HasColumnType("uuid");
|
||||
|
||||
b.Property<double>("CompoundScore")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
b.Property<double>("Confidence")
|
||||
.HasColumnType("double precision");
|
||||
|
||||
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.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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user