// using System; using DbContextLib; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; #nullable disable namespace DbContextLib.Migrations { [DbContext(typeof(LibraryContext))] [Migration("20240216040156_Mg")] partial class Mg { /// protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "8.0.1"); modelBuilder.Entity("Entities.BookEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Author") .IsRequired() .HasColumnType("TEXT"); b.Property("Isbn") .IsRequired() .HasColumnType("TEXT"); b.Property("OwnerId") .HasColumnType("INTEGER"); b.Property("PersonId") .HasColumnType("INTEGER"); b.Property("Title") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("OwnerId"); b.ToTable("BooksSet"); }); modelBuilder.Entity("Entities.PersonEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("FirstName") .IsRequired() .HasColumnType("TEXT"); b.Property("LastName") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("PersonSet"); }); modelBuilder.Entity("Entities.BookEntity", b => { b.HasOne("Entities.PersonEntity", "Owner") .WithMany("Books") .HasForeignKey("OwnerId"); b.Navigation("Owner"); }); modelBuilder.Entity("Entities.PersonEntity", b => { b.Navigation("Books"); }); #pragma warning restore 612, 618 } } }