Spielablauf umgesetzt
This commit is contained in:
1 parent
749bdb5179
commit
1097ab98fc
29 files changed
+828
-148
No files matched your search
@@ -0,0 +1,190 @@
|
||||
// <auto-generated />
|
||||
using FWLAZ_Web.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FWLAZ_Web.Migrations
|
||||
{
|
||||
[DbContext(typeof(LocalDbContext))]
|
||||
[Migration("20240901192908_AddQuizType")]
|
||||
partial class AddQuizType
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void BuildTargetModel(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<bool>("IsMultipleChoice")
|
||||
.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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace FWLAZ_Web.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddQuizType : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsMultipleChoice",
|
||||
table: "Quiz",
|
||||
type: "INTEGER",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsMultipleChoice",
|
||||
table: "Quiz");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -95,6 +95,9 @@ namespace FWLAZ_Web.Migrations
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<bool>("IsMultipleChoice")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
Reference in new issue
Block a user