|
|
|
|
// <auto-generated />
|
|
|
|
|
using System;
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Metadata;
|
|
|
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
|
using WebAPI.Data;
|
|
|
|
|
|
|
|
|
|
#nullable disable
|
|
|
|
|
|
|
|
|
|
namespace WebAPI.Migrations
|
|
|
|
|
{
|
|
|
|
|
[DbContext(typeof(ApplicationDbContext))]
|
|
|
|
|
partial class ApplicationDbContextModelSnapshot : ModelSnapshot
|
|
|
|
|
{
|
|
|
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
|
|
|
{
|
|
|
|
|
#pragma warning disable 612, 618
|
|
|
|
|
modelBuilder
|
|
|
|
|
.HasAnnotation("ProductVersion", "7.0.10")
|
|
|
|
|
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
|
|
|
|
|
|
|
|
|
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("SharedData.Models.Book", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("BookId")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("BookId"));
|
|
|
|
|
|
|
|
|
|
b.Property<string>("ISBN")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Title")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.HasKey("BookId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Books");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("SharedData.Models.GameResult", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("Id")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"));
|
|
|
|
|
|
|
|
|
|
b.Property<DateTime>("Date")
|
|
|
|
|
.HasColumnType("datetime2");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("Score")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<int>("UserId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("UserName")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.HasKey("Id");
|
|
|
|
|
|
|
|
|
|
b.ToTable("GameResults");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("SharedData.Models.Review", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Property<int>("ReviewId")
|
|
|
|
|
.ValueGeneratedOnAdd()
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("ReviewId"));
|
|
|
|
|
|
|
|
|
|
b.Property<int>("BookId")
|
|
|
|
|
.HasColumnType("int");
|
|
|
|
|
|
|
|
|
|
b.Property<string>("Context")
|
|
|
|
|
.IsRequired()
|
|
|
|
|
.HasColumnType("nvarchar(max)");
|
|
|
|
|
|
|
|
|
|
b.HasKey("ReviewId");
|
|
|
|
|
|
|
|
|
|
b.HasIndex("BookId");
|
|
|
|
|
|
|
|
|
|
b.ToTable("Reviews");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("SharedData.Models.Review", b =>
|
|
|
|
|
{
|
|
|
|
|
b.HasOne("SharedData.Models.Book", null)
|
|
|
|
|
.WithMany("Reviews")
|
|
|
|
|
.HasForeignKey("BookId")
|
|
|
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
|
|
|
.IsRequired();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
modelBuilder.Entity("SharedData.Models.Book", b =>
|
|
|
|
|
{
|
|
|
|
|
b.Navigation("Reviews");
|
|
|
|
|
});
|
|
|
|
|
#pragma warning restore 612, 618
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|