//
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
{
///
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("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("Key")
.IsRequired()
.HasMaxLength(150)
.HasColumnType("character varying(150)");
b.Property("LastUpdatedUtc")
.HasColumnType("timestamp with time zone");
b.Property("ServiceIdentifier")
.IsRequired()
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property("ValueJson")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("Key")
.IsUnique();
b.ToTable("DynamicSettings");
});
modelBuilder.Entity("FinlyticSentiment.Entities.ArticleSentimentEntity", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property("AnalyzedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("ArticleId")
.HasColumnType("uuid");
b.Property("CompoundScore")
.HasColumnType("double precision");
b.Property("Confidence")
.HasColumnType("double precision");
b.Property("Impact")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property("Isin")
.IsRequired()
.HasMaxLength(12)
.HasColumnType("character varying(12)");
b.Property("KeyHighlight")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property("Label")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("NegativeProbability")
.HasColumnType("double precision");
b.Property("NeutralProbability")
.HasColumnType("double precision");
b.Property("PositiveProbability")
.HasColumnType("double precision");
b.Property("PublishedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property("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("Isin")
.HasMaxLength(12)
.HasColumnType("character varying(12)");
b.Property("AverageConfidence")
.HasColumnType("double precision");
b.Property("AverageScore")
.HasColumnType("double precision");
b.Property("CurrentLabel")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property("LastUpdatedUtc")
.HasColumnType("timestamp with time zone");
b.Property("LatestKeyHighlight")
.HasMaxLength(1024)
.HasColumnType("character varying(1024)");
b.Property("Name")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property("NegativeCount")
.HasColumnType("integer");
b.Property("NeutralCount")
.HasColumnType("integer");
b.Property("PositiveCount")
.HasColumnType("integer");
b.Property("Sector")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property("TotalAnalysesCount")
.HasColumnType("integer");
b.Property("Trend")
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property("Version")
.IsConcurrencyToken()
.HasColumnType("bigint");
b.Property("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("Sector")
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property("AverageScore")
.HasColumnType("double precision");
b.Property("CurrentLabel")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property("LastUpdatedUtc")
.HasColumnType("timestamp with time zone");
b.Property("TotalArticlesCount")
.HasColumnType("integer");
b.Property("TotalCompaniesCount")
.HasColumnType("integer");
b.HasKey("Sector");
b.HasIndex("LastUpdatedUtc");
b.ToTable("sector_sentiment_summaries");
});
#pragma warning restore 612, 618
}
}
}