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.
sae_2a_anglais/Project/EntityFramework/StubbedContext/Migrations/StubbedContextModelSnapshot.cs

406 lines
13 KiB

// <auto-generated />
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<int>("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 = 1,
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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("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<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<long>("VocabularyListVocId")
.HasColumnType("INTEGER");
b.Property<int>("VocabularyListVocId1")
.HasColumnType("INTEGER");
b.Property<string>("WordsId")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("VocabularyListVocId1");
b.ToTable("Translates");
});
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<int?>("GroupId1")
.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<int?>("RoleId1")
.HasColumnType("INTEGER");
b.Property<string>("UserName")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("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<string>("word")
.HasColumnType("TEXT");
b.Property<string>("LangueName")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("word");
b.HasIndex("LangueName");
b.ToTable("Vocabularys");
});
modelBuilder.Entity("Entities.VocabularyListEntity", b =>
{
b.Property<int>("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");
});
modelBuilder.Entity("Entities.VocabularyListGroup", b =>
{
b.Property<int>("GroupsId")
.HasColumnType("INTEGER");
b.Property<int>("VocabularyListId1")
.HasColumnType("INTEGER");
b.Property<long>("GroupId")
.HasColumnType("INTEGER");
b.Property<long>("VocabularyListId")
.HasColumnType("INTEGER");
b.HasKey("GroupsId", "VocabularyListId1");
b.HasIndex("VocabularyListId1");
b.ToTable("VocabularyListGroup");
});
modelBuilder.Entity("Entities.VocabularyTranslateEntity", b =>
{
b.Property<string>("Wordsword")
.HasColumnType("TEXT");
b.Property<int>("translationsId")
.HasColumnType("INTEGER");
b.Property<string>("Translation")
.IsRequired()
.HasColumnType("TEXT");
b.Property<string>("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
}
}
}