// 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("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("HashedPassword") .IsRequired() .HasColumnType("TEXT"); b.Property("Username") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Administrators"); }); modelBuilder.Entity("Entities.AnswerEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Content") .IsRequired() .HasColumnType("TEXT"); b.Property("IdQuestion") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("IdQuestion"); b.ToTable("Answers"); }); modelBuilder.Entity("Entities.ChapterEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Chapters"); }); modelBuilder.Entity("Entities.LobbyEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("IdCreator") .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("NbPlayers") .HasColumnType("INTEGER"); b.Property("Password") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("IdCreator"); b.ToTable("Lobbies"); }); modelBuilder.Entity("Entities.LobbyEntityPlayerEntity", b => { b.Property("IdLobby") .HasColumnType("INTEGER"); b.Property("IdPlayer") .HasColumnType("INTEGER"); b.Property("MaxScore") .HasColumnType("INTEGER"); b.HasKey("IdLobby", "IdPlayer"); b.HasIndex("IdPlayer"); b.ToTable("Use"); }); modelBuilder.Entity("Entities.PlayerEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("HashedPassword") .IsRequired() .HasColumnType("TEXT"); b.Property("Nickname") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Players"); }); modelBuilder.Entity("Entities.PlayerEntityChapterEntity", b => { b.Property("IdPlayer") .HasColumnType("INTEGER"); b.Property("IdChapter") .HasColumnType("INTEGER"); b.Property("MaxScore") .HasColumnType("INTEGER"); b.HasKey("IdPlayer", "IdChapter"); b.HasIndex("IdChapter"); b.ToTable("Play"); }); modelBuilder.Entity("Entities.QuestionEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Content") .IsRequired() .HasColumnType("TEXT"); b.Property("Difficulty") .HasColumnType("INTEGER"); b.Property("IdAnswerGood") .HasColumnType("INTEGER"); b.Property("IdChapter") .HasColumnType("INTEGER"); b.Property("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 } } }