175 lines
5.6 KiB
C#
175 lines
5.6 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("20260801073336_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("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.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<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.HasKey("Id");
|
|
|
|
b.HasIndex("SourceUrl")
|
|
.IsUnique();
|
|
|
|
b.HasIndex("Status");
|
|
|
|
b.HasIndex("PublishedAt", "ScrapedAt");
|
|
|
|
b.ToTable("NewsArticles");
|
|
});
|
|
|
|
modelBuilder.Entity("FinlyticNews.Entities.NewsSettingsEntity", b =>
|
|
{
|
|
b.Property<Guid>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("uuid");
|
|
|
|
b.Property<int>("ArticleRetentionDays")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("DefaultPageSize")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<string>("N8nWebhookUrl")
|
|
.IsRequired()
|
|
.HasColumnType("text");
|
|
|
|
b.Property<int>("PollingFrequencyMinutes")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<int>("ScrapingIntervalMinutes")
|
|
.HasColumnType("integer");
|
|
|
|
b.Property<DateTime>("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
|
|
}
|
|
}
|
|
}
|