You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
261 lines
8.1 KiB
261 lines
8.1 KiB
// <auto-generated />
|
|
using System;
|
|
using DbConnectionLibrairie;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.EntityFrameworkCore.Infrastructure;
|
|
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
|
|
|
#nullable disable
|
|
|
|
namespace DbConnectionLibrairie.Migrations
|
|
{
|
|
[DbContext(typeof(MyDbContext))]
|
|
partial class MyDbContextModelSnapshot : ModelSnapshot
|
|
{
|
|
protected override void BuildModel(ModelBuilder modelBuilder)
|
|
{
|
|
#pragma warning disable 612, 618
|
|
modelBuilder.HasAnnotation("ProductVersion", "8.0.2");
|
|
|
|
modelBuilder.Entity("Entities.AdministratorEntity", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("HashedPassword")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Username")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Administrators");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.AnswerEntity", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Content")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int?>("IdQuestion")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("IdQuestion");
|
|
|
|
b.ToTable("Answers");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.ChapterEntity", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Chapters");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.LobbyEntity", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int?>("IdCreator")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("NbPlayers")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Password")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("IdCreator");
|
|
|
|
b.ToTable("Lobbies");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.LobbyEntityPlayerEntity", b =>
|
|
{
|
|
b.Property<int>("IdLobby")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("IdPlayer")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("MaxScore")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("IdLobby", "IdPlayer");
|
|
|
|
b.HasIndex("IdPlayer");
|
|
|
|
b.ToTable("Use");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.PlayerEntity", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("HashedPassword")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Nickname")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.ToTable("Players");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.PlayerEntityChapterEntity", b =>
|
|
{
|
|
b.Property<int>("IdPlayer")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("IdChapter")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("MaxScore")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("IdPlayer", "IdChapter");
|
|
|
|
b.HasIndex("IdChapter");
|
|
|
|
b.ToTable("Play");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.QuestionEntity", b =>
|
|
{
|
|
b.Property<int>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Content")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<byte>("Difficulty")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int?>("IdAnswerGood")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int?>("IdChapter")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("NbFalls")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("Id");
|
|
|
|
b.HasIndex("IdAnswerGood");
|
|
|
|
b.HasIndex("IdChapter");
|
|
|
|
b.ToTable("Questions");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.AnswerEntity", b =>
|
|
{
|
|
b.HasOne("Entities.QuestionEntity", "Question")
|
|
.WithMany()
|
|
.HasForeignKey("IdQuestion");
|
|
|
|
b.Navigation("Question");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.LobbyEntity", b =>
|
|
{
|
|
b.HasOne("Entities.PlayerEntity", "Creator")
|
|
.WithMany()
|
|
.HasForeignKey("IdCreator");
|
|
|
|
b.Navigation("Creator");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.LobbyEntityPlayerEntity", b =>
|
|
{
|
|
b.HasOne("Entities.LobbyEntity", "Lobby")
|
|
.WithMany()
|
|
.HasForeignKey("IdLobby")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Entities.PlayerEntity", "Player")
|
|
.WithMany()
|
|
.HasForeignKey("IdPlayer")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Lobby");
|
|
|
|
b.Navigation("Player");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.PlayerEntityChapterEntity", b =>
|
|
{
|
|
b.HasOne("Entities.ChapterEntity", "Chapter")
|
|
.WithMany()
|
|
.HasForeignKey("IdChapter")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.HasOne("Entities.PlayerEntity", "Player")
|
|
.WithMany()
|
|
.HasForeignKey("IdPlayer")
|
|
.OnDelete(DeleteBehavior.Cascade)
|
|
.IsRequired();
|
|
|
|
b.Navigation("Chapter");
|
|
|
|
b.Navigation("Player");
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.QuestionEntity", b =>
|
|
{
|
|
b.HasOne("Entities.AnswerEntity", "AnswerGood")
|
|
.WithMany()
|
|
.HasForeignKey("IdAnswerGood");
|
|
|
|
b.HasOne("Entities.ChapterEntity", "Chapter")
|
|
.WithMany()
|
|
.HasForeignKey("IdChapter");
|
|
|
|
b.Navigation("AnswerGood");
|
|
|
|
b.Navigation("Chapter");
|
|
});
|
|
#pragma warning restore 612, 618
|
|
}
|
|
}
|
|
}
|