// using System; using FinlyticNews.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 FinlyticNews.Migrations { [DbContext(typeof(NewsDbContext))] [Migration("20260801073336_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("FinlyticNews.Entities.ArticleSourceEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("Source") .IsRequired() .HasColumnType("text"); b.Property("Type") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.ToTable("ArticleSources"); }); modelBuilder.Entity("FinlyticNews.Entities.MatchedAssetEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Isin") .IsRequired() .HasColumnType("text"); b.Property("Name") .IsRequired() .HasColumnType("text"); b.Property("NewsArticleId") .HasColumnType("uuid"); b.HasKey("Id"); b.HasIndex("Isin"); b.HasIndex("NewsArticleId"); b.ToTable("MatchedAssets"); }); modelBuilder.Entity("FinlyticNews.Entities.NewsArticleEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("Author") .HasColumnType("text"); b.Property("ContentRaw") .IsRequired() .HasColumnType("text"); b.Property("Language") .HasColumnType("text"); b.Property("PublishedAt") .HasColumnType("timestamp with time zone"); b.Property("ScrapedAt") .HasColumnType("timestamp with time zone"); b.Property("SourceUrl") .IsRequired() .HasColumnType("text"); b.Property("Status") .IsRequired() .HasColumnType("text"); b.Property("Summary") .HasColumnType("text"); b.Property("Title") .IsRequired() .HasColumnType("text"); b.HasKey("Id"); b.HasIndex("SourceUrl") .IsUnique(); b.HasIndex("Status"); b.HasIndex("PublishedAt", "ScrapedAt"); b.ToTable("NewsArticles"); }); modelBuilder.Entity("FinlyticNews.Entities.NewsSettingsEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("ArticleRetentionDays") .HasColumnType("integer"); b.Property("DefaultPageSize") .HasColumnType("integer"); b.Property("N8nWebhookUrl") .IsRequired() .HasColumnType("text"); b.Property("PollingFrequencyMinutes") .HasColumnType("integer"); b.Property("ScrapingIntervalMinutes") .HasColumnType("integer"); b.Property("UpdatedAt") .HasColumnType("timestamp with time zone"); b.HasKey("Id"); b.ToTable("Settings"); }); modelBuilder.Entity("FinlyticNews.Entities.MatchedAssetEntity", b => { b.HasOne("FinlyticNews.Entities.NewsArticleEntity", "NewsArticle") .WithMany("MatchedAssets") .HasForeignKey("NewsArticleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("NewsArticle"); }); modelBuilder.Entity("FinlyticNews.Entities.NewsArticleEntity", b => { b.Navigation("MatchedAssets"); }); #pragma warning restore 612, 618 } } }