185 lines
5.8 KiB
C#
185 lines
5.8 KiB
C#
// <auto-generated />
|
|
using FWLAZ_Web.Data;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace FWLAZ_Web.Migrations
|
|
{
|
|
[DbContext(typeof(LocalDbContext))]
|
|
partial class LocalDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "8.0.8");
|
|
|
|
modelBuilder.Entity("FWLAZ_Web.Data.Answer", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<bool>("IsCorrect")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Position")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("QuestionId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Text")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("QuestionId");
|
|
|
|
b.ToTable("Answers");
|
|
});
|
|
|
|
modelBuilder.Entity("FWLAZ_Web.Data.Question", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("Number")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("QuizId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Text")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("QuizId");
|
|
|
|
b.ToTable("Question");
|
|
});
|
|
|
|
modelBuilder.Entity("FWLAZ_Web.Data.QuestionGroup", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("Order")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("QuizId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("QuizId");
|
|
|
|
b.ToTable("QuestionGroup");
|
|
});
|
|
|
|
modelBuilder.Entity("FWLAZ_Web.Data.Quiz", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Quiz");
|
|
});
|
|
|
|
modelBuilder.Entity("QuestionQuestionGroup", b =>
|
|
{
|
|
b.Property<int>("QuestionGroupsId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("QuestionsId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("QuestionGroupsId", "QuestionsId");
|
|
|
|
b.HasIndex("QuestionsId");
|
|
|
|
b.ToTable("QuestionQuestionGroup");
|
|
});
|
|
|
|
modelBuilder.Entity("FWLAZ_Web.Data.Answer", b =>
|
|
{
|
|
b.HasOne("FWLAZ_Web.Data.Question", "Question")
|
|
.WithMany("Answers")
|
|
.HasForeignKey("QuestionId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Question");
|
|
});
|
|
|
|
modelBuilder.Entity("FWLAZ_Web.Data.Question", b =>
|
|
{
|
|
b.HasOne("FWLAZ_Web.Data.Quiz", "Quiz")
|
|
.WithMany("Questions")
|
|
.HasForeignKey("QuizId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Quiz");
|
|
});
|
|
|
|
modelBuilder.Entity("FWLAZ_Web.Data.QuestionGroup", b =>
|
|
{
|
|
b.HasOne("FWLAZ_Web.Data.Quiz", "Quiz")
|
|
.WithMany("Questiongroups")
|
|
.HasForeignKey("QuizId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Quiz");
|
|
});
|
|
|
|
modelBuilder.Entity("QuestionQuestionGroup", b =>
|
|
{
|
|
b.HasOne("FWLAZ_Web.Data.QuestionGroup", null)
|
|
.WithMany()
|
|
.HasForeignKey("QuestionGroupsId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("FWLAZ_Web.Data.Question", null)
|
|
.WithMany()
|
|
.HasForeignKey("QuestionsId")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
});
|
|
|
|
modelBuilder.Entity("FWLAZ_Web.Data.Question", b =>
|
|
{
|
|
b.Navigation("Answers");
|
|
});
|
|
|
|
modelBuilder.Entity("FWLAZ_Web.Data.Quiz", b =>
|
|
{
|
|
b.Navigation("Questiongroups");
|
|
|
|
b.Navigation("Questions");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|