// using System; 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 = 1, 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 = 1, Name = "Admin" }, new { Id = 2, Name = "Teacher" }, new { Id = 3, Name = "Student" }); }); modelBuilder.Entity("Entities.TranslateEntity", b => { b.Property("Id") .ValueGeneratedOnAdd() .HasColumnType("INTEGER"); b.Property("VocabularyListVocId") .HasColumnType("INTEGER"); b.Property("VocabularyListVocId1") .HasColumnType("INTEGER"); b.Property("WordsId") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("VocabularyListVocId1"); b.ToTable("Translates"); }); 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("GroupId1") .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("RoleId1") .HasColumnType("INTEGER"); b.Property("UserName") .IsRequired() .HasColumnType("TEXT"); b.Property("image") .HasColumnType("TEXT"); b.HasKey("Id"); b.HasIndex("GroupId1"); b.HasIndex("RoleId1"); b.ToTable("Users"); b.HasData( new { Id = 1L, Email = "", ExtraTime = true, GroupId = 1L, Name = "name", NickName = "nickname", Password = "1234", RoleId = 0L, UserName = "username" }, new { Id = 2L, Email = "", ExtraTime = true, GroupId = 2L, Name = "name2", NickName = "nickname2", Password = "1234", RoleId = 0L, UserName = "username2" }, new { Id = 3L, Email = "", ExtraTime = true, GroupId = 3L, Name = "name3", NickName = "nickname3", Password = "1234", RoleId = 0L, 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"); }); 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"); }); modelBuilder.Entity("Entities.VocabularyListGroup", b => { b.Property("GroupsId") .HasColumnType("INTEGER"); b.Property("VocabularyListId1") .HasColumnType("INTEGER"); b.Property("GroupId") .HasColumnType("INTEGER"); b.Property("VocabularyListId") .HasColumnType("INTEGER"); b.HasKey("GroupsId", "VocabularyListId1"); b.HasIndex("VocabularyListId1"); b.ToTable("VocabularyListGroup"); }); modelBuilder.Entity("Entities.VocabularyTranslateEntity", b => { b.Property("Wordsword") .HasColumnType("TEXT"); b.Property("translationsId") .HasColumnType("INTEGER"); b.Property("Translation") .IsRequired() .HasColumnType("TEXT"); b.Property("Word") .IsRequired() .HasColumnType("TEXT"); b.HasKey("Wordsword", "translationsId"); b.HasIndex("translationsId"); b.ToTable("VocabularyTranslateEntity"); }); modelBuilder.Entity("Entities.TranslateEntity", b => { b.HasOne("Entities.VocabularyListEntity", "VocabularyListVoc") .WithMany("translation") .HasForeignKey("VocabularyListVocId1") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.Navigation("VocabularyListVoc"); }); modelBuilder.Entity("Entities.UserEntity", b => { b.HasOne("Entities.GroupEntity", "Group") .WithMany("Users") .HasForeignKey("GroupId1"); b.HasOne("Entities.RoleEntity", "Role") .WithMany("Users") .HasForeignKey("RoleId1"); 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("Entities.VocabularyListGroup", b => { b.HasOne("Entities.GroupEntity", null) .WithMany() .HasForeignKey("GroupsId") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Entities.VocabularyListEntity", null) .WithMany() .HasForeignKey("VocabularyListId1") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); }); modelBuilder.Entity("Entities.VocabularyTranslateEntity", b => { b.HasOne("Entities.VocabularyEntity", null) .WithMany() .HasForeignKey("Wordsword") .OnDelete(DeleteBehavior.Cascade) .IsRequired(); b.HasOne("Entities.TranslateEntity", null) .WithMany() .HasForeignKey("translationsId") .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("translation"); }); #pragma warning restore 612, 618 } } }