From 11f8eac60abfd52d59e84ba7b3c1c1c042c03941 Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Fri, 1 Sep 2023 13:03:57 +1000 Subject: Merged OCR functionality --- Migrations/HBContextModelSnapshot.cs | 43 ++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'Migrations/HBContextModelSnapshot.cs') diff --git a/Migrations/HBContextModelSnapshot.cs b/Migrations/HBContextModelSnapshot.cs index 06b3e20..72b662f 100644 --- a/Migrations/HBContextModelSnapshot.cs +++ b/Migrations/HBContextModelSnapshot.cs @@ -42,6 +42,36 @@ namespace HyperBooru.Migrations b.UseTptMappingStrategy(); }); + modelBuilder.Entity("HyperBooru.OcrData", b => + { + b.Property("OcrDataId") + .ValueGeneratedOnAdd() + .HasColumnType("integer"); + + NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property("OcrDataId")); + + b.Property("MediaId") + .HasColumnType("integer"); + + b.Property("SearchableText") + .IsRequired() + .HasColumnType("text"); + + b.Property("Text") + .IsRequired() + .HasColumnType("text"); + + b.Property("Timestamp") + .HasColumnType("timestamp with time zone"); + + b.HasKey("OcrDataId"); + + b.HasIndex("MediaId") + .IsUnique(); + + b.ToTable("OcrData"); + }); + modelBuilder.Entity("TagDefinitionTagDefinition", b => { b.Property("ImplicitTagsObjectId") @@ -174,6 +204,17 @@ namespace HyperBooru.Migrations b.ToTable("UploadedFiles", (string)null); }); + modelBuilder.Entity("HyperBooru.OcrData", b => + { + b.HasOne("HyperBooru.Media", "Media") + .WithOne("OcrData") + .HasForeignKey("HyperBooru.OcrData", "MediaId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.Navigation("Media"); + }); + modelBuilder.Entity("TagDefinitionTagDefinition", b => { b.HasOne("HyperBooru.TagDefinition", null) @@ -256,6 +297,8 @@ namespace HyperBooru.Migrations modelBuilder.Entity("HyperBooru.Media", b => { + b.Navigation("OcrData"); + b.Navigation("UploadedFiles"); }); #pragma warning restore 612, 618 -- cgit v1.3