// using System; using FinlyticNews.Database; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata; #nullable disable namespace FinlyticNews.Migrations { [DbContext(typeof(NewsDbContext))] partial class NewsDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(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("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.BlockedNewsUrlEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("uuid"); b.Property("BlockedAtUtc") .HasColumnType("timestamp with time zone"); b.Property("Reason") .IsRequired() .HasMaxLength(256) .HasColumnType("character varying(256)"); b.Property("Url") .IsRequired() .HasMaxLength(2048) .HasColumnType("character varying(2048)"); b.HasKey("Id"); b.HasIndex("Url") .IsUnique(); b.ToTable("BlockedNewsUrls"); }); 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("SimHash") .HasColumnType("bigint"); b.Property("SourceUrl") .IsRequired() .HasColumnType("text"); b.Property("Status") .IsRequired() .HasColumnType("text"); b.Property("Summary") .HasColumnType("text"); b.Property("Title") .IsRequired() .HasColumnType("text"); b.Property("TitleHash") .HasMaxLength(64) .HasColumnType("character varying(64)"); b.HasKey("Id"); b.HasIndex("SimHash"); b.HasIndex("SourceUrl") .IsUnique(); b.HasIndex("Status"); b.HasIndex("TitleHash"); b.HasIndex("PublishedAt", "ScrapedAt"); b.ToTable("NewsArticles"); }); 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 } } }