Files
Finlytic/FinlyticNews/Migrations/20260818194224_Init.Designer.cs
T

214 lines
7.0 KiB
C#

// <auto-generated />
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("20260818194224_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("FinlyticNews.Entities.ArticleSourceEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Source")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Type")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.ToTable("ArticleSources");
});
modelBuilder.Entity("FinlyticNews.Entities.BlockedNewsUrlEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTime>("BlockedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("Reason")
.IsRequired()
.HasMaxLength(256)
.HasColumnType("character varying(256)");
b.Property<string>("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<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Isin")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<Guid>("NewsArticleId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("Isin");
b.HasIndex("NewsArticleId");
b.ToTable("MatchedAssets");
});
modelBuilder.Entity("FinlyticNews.Entities.NewsArticleEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<string>("Author")
.HasColumnType("text");
b.Property<string>("ContentRaw")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Language")
.HasColumnType("text");
b.Property<DateTime>("PublishedAt")
.HasColumnType("timestamp with time zone");
b.Property<DateTime>("ScrapedAt")
.HasColumnType("timestamp with time zone");
b.Property<long?>("SimHash")
.HasColumnType("bigint");
b.Property<string>("SourceUrl")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Status")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Summary")
.HasColumnType("text");
b.Property<string>("Title")
.IsRequired()
.HasColumnType("text");
b.Property<string>("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
}
}
}