Playwright-Headless-Browser.../src/WebAccess.MCP/WebCache/Migrations/20260820061730_AddChunkFull...

152 lines
5.3 KiB
C#

// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using NpgsqlTypes;
using WebAccess.MCP.WebCache;
#nullable disable
namespace WebAccess.MCP.WebCache.Migrations
{
[DbContext(typeof(WebCacheDbContext))]
[Migration("20260820061730_AddChunkFullTextSearch")]
partial class AddChunkFullTextSearch
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "10.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("WebAccess.MCP.WebCache.CachedWebPage", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<string>("CacheKey")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("character(64)")
.IsFixedLength();
b.Property<string>("ContentHash")
.HasMaxLength(64)
.HasColumnType("character(64)")
.IsFixedLength();
b.Property<string>("ContentType")
.HasMaxLength(255)
.HasColumnType("character varying(255)");
b.Property<DateTimeOffset>("ExpiresAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<DateTimeOffset>("FetchedAtUtc")
.HasColumnType("timestamp with time zone");
b.Property<string>("FinalUrl")
.HasColumnType("text");
b.Property<int?>("HttpStatusCode")
.HasColumnType("integer");
b.Property<bool>("IsComplete")
.HasColumnType("boolean");
b.Property<string>("RawHtml")
.HasColumnType("text");
b.Property<string>("RequestedUrl")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Title")
.HasColumnType("text");
b.Property<int>("TotalTextLength")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("CacheKey")
.IsUnique();
b.HasIndex("ExpiresAtUtc");
b.ToTable("cached_web_pages", (string)null);
});
modelBuilder.Entity("WebAccess.MCP.WebCache.CachedWebPageChunk", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<long>("CachedWebPageId")
.HasColumnType("bigint");
b.Property<int>("ChunkNumber")
.HasColumnType("integer");
b.Property<int>("Length")
.HasColumnType("integer");
b.Property<NpgsqlTsVector>("SearchVector")
.IsRequired()
.ValueGeneratedOnAddOrUpdate()
.HasColumnType("tsvector")
.HasAnnotation("Npgsql:TsVectorConfig", "simple")
.HasAnnotation("Npgsql:TsVectorProperties", new[] { "Text" });
b.Property<int>("StartOffset")
.HasColumnType("integer");
b.Property<string>("Text")
.IsRequired()
.HasColumnType("text");
b.HasKey("Id");
b.HasIndex("SearchVector");
NpgsqlIndexBuilderExtensions.HasMethod(b.HasIndex("SearchVector"), "GIN");
b.HasIndex("CachedWebPageId", "ChunkNumber")
.IsUnique();
b.ToTable("cached_web_page_chunks", (string)null);
});
modelBuilder.Entity("WebAccess.MCP.WebCache.CachedWebPageChunk", b =>
{
b.HasOne("WebAccess.MCP.WebCache.CachedWebPage", "CachedWebPage")
.WithMany("Chunks")
.HasForeignKey("CachedWebPageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("CachedWebPage");
});
modelBuilder.Entity("WebAccess.MCP.WebCache.CachedWebPage", b =>
{
b.Navigation("Chunks");
});
#pragma warning restore 612, 618
}
}
}