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.
410 lines
13 KiB
410 lines
13 KiB
// <auto-generated />
|
|
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<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<int>("Num")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("sector")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<int>("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<string>("name")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.HasKey("name");
|
|
|
|
b.ToTable("Langues");
|
|
|
|
b.HasData(
|
|
new
|
|
{
|
|
name = "French"
|
|
},
|
|
new
|
|
{
|
|
name = "English"
|
|
});
|
|
});
|
|
|
|
modelBuilder.Entity("Entities.RoleEntity", b =>
|
|
{
|
|
b.Property<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("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<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<long>("VocabularyListVocId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("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<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Email")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<bool>("ExtraTime")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<long>("GroupId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("NickName")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Password")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<long>("RoleId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("UserName")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("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<string>("word")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("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<long>("Id")
|
|
.ValueGeneratedOnAdd()
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<string>("Image")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<string>("Name")
|
|
.IsRequired()
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<long>("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<long>("GroupVocabularyListId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.Property<long>("VocsGroupsId")
|
|
.HasColumnType("INTEGER");
|
|
|
|
b.HasKey("GroupVocabularyListId", "VocsGroupsId");
|
|
|
|
b.HasIndex("VocsGroupsId");
|
|
|
|
b.ToTable("GroupEntityVocabularyListEntity");
|
|
});
|
|
|
|
modelBuilder.Entity("TranslateEntityVocabularyEntity", b =>
|
|
{
|
|
b.Property<string>("TransVocword")
|
|
.HasColumnType("TEXT");
|
|
|
|
b.Property<long>("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
|
|
}
|
|
}
|
|
}
|