// using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; using Microsoft.EntityFrameworkCore.Storage.ValueConversion; using StubbedContextLib; #nullable disable namespace StubbedContextLib.Migrations { [DbContext(typeof(StubbedContext))] partial class StubbedContextModelSnapshot : ModelSnapshot { protected override void BuildModel(ModelBuilder modelBuilder) { #pragma warning disable 612, 618 modelBuilder.HasAnnotation("ProductVersion", "8.0.1"); modelBuilder.Entity("Entities.GroupEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Num") .HasColumnType("INTEGER"); b.Property("sector") .IsRequired() .HasColumnType("TEXT"); b.Property("year") .HasColumnType("INTEGER"); b.HasKey("Id"); b.ToTable("Groups"); b.HasData( new { Id = 1L, Num = 1, sector = "informatics", year = 1 }); }); modelBuilder.Entity("Entities.LangueEntity", b => { b.Property("name") .HasColumnType("TEXT"); b.HasKey("name"); b.ToTable("Langues"); b.HasData( new { name = "French" }, new { name = "English" }); }); modelBuilder.Entity("Entities.RoleEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.ToTable("Roles"); b.HasData( new { Id = 1L, Name = "Admin" }, new { Id = 2L, Name = "Teacher" }, new { Id = 3L, Name = "Student" }); }); modelBuilder.Entity("Entities.TranslateEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("VocabularyListVocId") .HasColumnType("INTEGER"); b.Property("WordsId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("VocabularyListVocId"); b.ToTable("Translates"); b.HasData( new { Id = 1L, VocabularyListVocId = 1L, WordsId = "1" }); }); modelBuilder.Entity("Entities.UserEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Email") .IsRequired() .HasColumnType("TEXT"); b.Property("ExtraTime") .HasColumnType("INTEGER"); b.Property("GroupId") .HasColumnType("INTEGER"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("NickName") .IsRequired() .HasColumnType("TEXT"); b.Property("Password") .IsRequired() .HasColumnType("TEXT"); b.Property("RoleId") .HasColumnType("INTEGER"); b.Property("UserName") .IsRequired() .HasColumnType("TEXT"); b.Property("image") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("GroupId"); b.HasIndex("RoleId"); b.ToTable("Users"); b.HasData( new { Id = 1L, Email = "", ExtraTime = true, GroupId = 1L, Name = "name", NickName = "nickname", Password = "1234", RoleId = 1L, UserName = "username" }, new { Id = 2L, Email = "", ExtraTime = true, GroupId = 1L, Name = "name2", NickName = "nickname2", Password = "1234", RoleId = 2L, UserName = "username2" }, new { Id = 3L, Email = "", ExtraTime = true, GroupId = 1L, Name = "name3", NickName = "nickname3", Password = "1234", RoleId = 3L, UserName = "username3" }); }); modelBuilder.Entity("Entities.VocabularyEntity", b => { b.Property("word") .HasColumnType("TEXT"); b.Property("LangueName") .IsRequired() .HasColumnType("TEXT"); b.HasKey("word"); b.HasIndex("LangueName"); b.ToTable("Vocabularys"); b.HasData( new { word = "Bonjour", LangueName = "French" }); }); modelBuilder.Entity("Entities.VocabularyListEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("Image") .IsRequired() .HasColumnType("TEXT"); b.Property("Name") .IsRequired() .HasColumnType("TEXT"); b.Property("UserId") .HasColumnType("INTEGER"); b.HasKey("Id"); b.HasIndex("UserId"); b.ToTable("VocabularyLists"); b.HasData( new { Id = 1L, Image = "image1", Name = "Liste1", UserId = 1L }); }); modelBuilder.Entity("GroupEntityVocabularyListEntity", b => { b.Property("GroupVocabularyListId") .HasColumnType("INTEGER"); b.Property("VocsGroupsId") .HasColumnType("INTEGER"); b.HasKey("GroupVocabularyListId", "VocsGroupsId"); b.HasIndex("VocsGroupsId"); b.ToTable("GroupEntityVocabularyListEntity"); }); modelBuilder.Entity("TranslateEntityVocabularyEntity", b => { b.Property("TransVocword") .HasColumnType("TEXT"); b.Property("VoctranslationsId") .HasColumnType("INTEGER"); b.HasKey("TransVocword", "VoctranslationsId"); b.HasIndex("VoctranslationsId"); b.ToTable("TranslateEntityVocabularyEntity"); }); modelBuilder.Entity("Entities.TranslateEntity", b => { b.HasOne("Entities.VocabularyListEntity", "VocabularyListVoc") .WithMany("translations") .HasForeignKey("VocabularyListVocId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("VocabularyListVoc"); }); modelBuilder.Entity("Entities.UserEntity", b => { b.HasOne("Entities.GroupEntity", "Group") .WithMany("Users") .HasForeignKey("GroupId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Entities.RoleEntity", "Role") .WithMany("Users") .HasForeignKey("RoleId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Group"); b.Navigation("Role"); }); modelBuilder.Entity("Entities.VocabularyEntity", b => { b.HasOne("Entities.LangueEntity", "Langue") .WithMany("vocabularys") .HasForeignKey("LangueName") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("Langue"); }); modelBuilder.Entity("Entities.VocabularyListEntity", b => { b.HasOne("Entities.UserEntity", "User") .WithMany("VocabularyList") .HasForeignKey("UserId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("User"); }); modelBuilder.Entity("GroupEntityVocabularyListEntity", b => { b.HasOne("Entities.VocabularyListEntity", null) .WithMany() .HasForeignKey("GroupVocabularyListId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Entities.GroupEntity", null) .WithMany() .HasForeignKey("VocsGroupsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("TranslateEntityVocabularyEntity", b => { b.HasOne("Entities.VocabularyEntity", null) .WithMany() .HasForeignKey("TransVocword") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Entities.TranslateEntity", null) .WithMany() .HasForeignKey("VoctranslationsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Entities.GroupEntity", b => { b.Navigation("Users"); }); modelBuilder.Entity("Entities.LangueEntity", b => { b.Navigation("vocabularys"); }); modelBuilder.Entity("Entities.RoleEntity", b => { b.Navigation("Users"); }); modelBuilder.Entity("Entities.UserEntity", b => { b.Navigation("VocabularyList"); }); modelBuilder.Entity("Entities.VocabularyListEntity", b => { b.Navigation("translations"); }); #pragma warning restore 612, 618 } } }