// <auto-generated /> using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Migrations; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using SitePi; namespace SitePi.Migrations { [DbContext(typeof(AppContext))] [Migration("20191022151100_1")] partial class _1 { protected override void BuildTargetModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder .HasAnnotation("ProductVersion", "2.2.6-servicing-10079") .HasAnnotation("Relational:MaxIdentifierLength", 64); modelBuilder.Entity("SitePi.Models.Bot", b => { b.Property<int>("Id") .ValueGeneratedOnAdd(); b.Property<string>("FileBytes"); b.Property<string>("FileName"); b.Property<string>("Name") .IsRequired(); b.Property<float>("PercentageA"); b.Property<float>("PercentageB"); b.Property<float>("PercentageC"); b.Property<float>("PercentageD"); b.Property<int>("UserId"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("Bots"); }); modelBuilder.Entity("SitePi.Models.Choice", b => { b.Property<int>("Id") .ValueGeneratedOnAdd(); b.Property<int>("ProfileId"); b.Property<int>("QuestionId"); b.Property<string>("Text") .IsRequired(); b.HasKey("Id"); b.HasIndex("ProfileId"); b.HasIndex("QuestionId"); b.ToTable("Choices"); }); modelBuilder.Entity("SitePi.Models.Profile", b => { b.Property<int>("Id") .ValueGeneratedOnAdd(); b.Property<string>("Name") .IsRequired(); b.HasKey("Id"); b.ToTable("Profiles"); }); modelBuilder.Entity("SitePi.Models.Question", b => { b.Property<int>("Id") .ValueGeneratedOnAdd(); b.Property<int>("QuizId"); b.Property<string>("Text") .IsRequired(); b.HasKey("Id"); b.HasIndex("QuizId"); b.ToTable("Questions"); }); modelBuilder.Entity("SitePi.Models.Quiz", b => { b.Property<int>("Id") .ValueGeneratedOnAdd(); b.Property<string>("Name") .IsRequired(); b.HasKey("Id"); b.ToTable("Quizzes"); }); modelBuilder.Entity("SitePi.Models.User", b => { b.Property<int>("Id") .ValueGeneratedOnAdd(); b.Property<string>("Email") .IsRequired() .HasMaxLength(100); b.Property<string>("Name") .IsRequired() .HasMaxLength(25); b.Property<string>("PasswordHash") .IsRequired() .HasMaxLength(45); b.HasKey("Id"); b.ToTable("Users"); }); modelBuilder.Entity("SitePi.Models.Bot", b => { b.HasOne("SitePi.Models.User", "User") .WithMany() .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("SitePi.Models.Choice", b => { b.HasOne("SitePi.Models.Profile", "Profile") .WithMany() .HasForeignKey("ProfileId") .OnDelete(DeleteBehavior.Cascade); b.HasOne("SitePi.Models.Question", "Question") .WithMany("Choices") .HasForeignKey("QuestionId") .OnDelete(DeleteBehavior.Cascade); }); modelBuilder.Entity("SitePi.Models.Question", b => { b.HasOne("SitePi.Models.Quiz", "Quiz") .WithMany("Questions") .HasForeignKey("QuizId") .OnDelete(DeleteBehavior.Cascade); }); #pragma warning restore 612, 618 } } }