//
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using StubbedContextLib;
#nullable disable
namespace StubbedContextLib.Migrations
{
[DbContext(typeof(StubbedContext))]
partial class StubbedContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(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("BookEntity");
b.HasData(
new
{
Id = 1L,
Author = "test",
Isbn = "test",
PersonId = 1,
Title = "test"
},
new
{
Id = 2L,
Author = "test2",
Isbn = "test2",
PersonId = 1,
Title = "test2"
});
});
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("PersonEntity");
b.HasData(
new
{
Id = 1,
FirstName = "coco",
LastName = "test"
});
});
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
}
}
}