// using System; using InkForge.Data; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace InkForge.Sqlite.Migrations { [DbContext(typeof(NoteDbContext))] partial class NoteDbContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "8.0.3"); modelBuilder.Entity("InkForge.Data.Blob", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Value") .IsRequired() .HasColumnType("BLOB"); b.HasKey("Id"); b.ToTable("Blobs"); }); modelBuilder.Entity("InkForge.Data.MetadataEntity", b => { b.Property("Id") .HasColumnType("TEXT"); b.Property("Value") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Metadata"); }); modelBuilder.Entity("InkForge.Data.NoteEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("ParentId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("ParentId"); b.ToTable("Notes"); }); modelBuilder.Entity("InkForge.Data.NoteEntity", b => { b.HasOne("InkForge.Data.NoteEntity", "Parent") .WithMany() .HasForeignKey("ParentId"); b.OwnsOne("InkForge.Data.Note", "Value", b1 => { b1.Property("NoteEntityId") .HasColumnType("INTEGER"); b1.Property("ContentId") .HasColumnType("INTEGER"); b1.Property("Created") .HasColumnType("TEXT"); b1.Property("Deleted") .HasColumnType("TEXT"); b1.Property("Name") .IsRequired() .HasColumnType("TEXT"); b1.Property("Updated") .HasColumnType("TEXT"); b1.HasKey("NoteEntityId"); b1.HasIndex("ContentId") .IsUnique(); b1.ToTable("Notes"); b1.HasOne("InkForge.Data.Blob", null) .WithOne() .HasForeignKey("InkForge.Data.NoteEntity.Value#InkForge.Data.Note", "ContentId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b1.WithOwner() .HasForeignKey("NoteEntityId"); }); b.Navigation("Parent"); b.Navigation("Value") .IsRequired(); }); #pragma warning restore 612, 618 } } }