//
using EntityFramwork;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
#nullable disable
namespace EntityFramwork.Migrations
{
[DbContext(typeof(BDDContext))]
[Migration("20230222130004_final")]
partial class final
{
///
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
modelBuilder.Entity("DTO.EntityChampions", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Bio")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Classe")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Icon")
.IsRequired()
.HasColumnType("TEXT");
b.Property("ImageId")
.HasColumnType("INTEGER");
b.Property("Name")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ImageId")
.IsUnique();
b.HasIndex("Name")
.IsUnique();
b.ToTable("Champions");
});
modelBuilder.Entity("EntityFramwork.EntityCategorieRune", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Category")
.IsRequired()
.HasColumnType("TEXT");
b.Property("IdPageRune")
.HasColumnType("INTEGER");
b.Property("IdRune")
.HasColumnType("INTEGER");
b.HasKey("Id");
b.HasIndex("IdPageRune");
b.HasIndex("IdRune");
b.ToTable("EntityCategorieRune");
});
modelBuilder.Entity("EntityFramwork.EntityLargeImage", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Base64")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("Images");
});
modelBuilder.Entity("EntityFramwork.EntityPageRune", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Name")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("EntityPageRune");
});
modelBuilder.Entity("EntityFramwork.EntityRunes", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("Description")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Family")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Icon")
.IsRequired()
.HasColumnType("TEXT");
b.Property("ImageId")
.HasColumnType("INTEGER");
b.Property("Name")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ImageId")
.IsUnique();
b.ToTable("Runes");
});
modelBuilder.Entity("EntityFramwork.EntitySkill", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("ChampionId")
.HasColumnType("INTEGER");
b.Property("Description")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Name")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Type")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ChampionId");
b.ToTable("Skills");
});
modelBuilder.Entity("EntityFramwork.EntitySkins", b =>
{
b.Property("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property("ChampionId")
.HasColumnType("INTEGER");
b.Property("Description")
.IsRequired()
.HasColumnType("TEXT");
b.Property("Icon")
.IsRequired()
.HasColumnType("TEXT");
b.Property("ImageId")
.HasColumnType("INTEGER");
b.Property("Price")
.HasColumnType("REAL");
b.HasKey("Id");
b.HasIndex("ChampionId");
b.HasIndex("ImageId")
.IsUnique();
b.ToTable("Skins");
});
modelBuilder.Entity("DTO.EntityChampions", b =>
{
b.HasOne("EntityFramwork.EntityLargeImage", "Image")
.WithOne("Champion")
.HasForeignKey("DTO.EntityChampions", "ImageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Image");
});
modelBuilder.Entity("EntityFramwork.EntityCategorieRune", b =>
{
b.HasOne("EntityFramwork.EntityPageRune", "PageRune")
.WithMany("CategorieRune")
.HasForeignKey("IdPageRune")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("EntityFramwork.EntityRunes", "Rune")
.WithMany("CategorieRune")
.HasForeignKey("IdRune")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("PageRune");
b.Navigation("Rune");
});
modelBuilder.Entity("EntityFramwork.EntityRunes", b =>
{
b.HasOne("EntityFramwork.EntityLargeImage", "Image")
.WithOne("Rune")
.HasForeignKey("EntityFramwork.EntityRunes", "ImageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Image");
});
modelBuilder.Entity("EntityFramwork.EntitySkill", b =>
{
b.HasOne("DTO.EntityChampions", "Champions")
.WithMany("Skills")
.HasForeignKey("ChampionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Champions");
});
modelBuilder.Entity("EntityFramwork.EntitySkins", b =>
{
b.HasOne("DTO.EntityChampions", "Champion")
.WithMany("Skins")
.HasForeignKey("ChampionId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("EntityFramwork.EntityLargeImage", "Image")
.WithOne("Skin")
.HasForeignKey("EntityFramwork.EntitySkins", "ImageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Champion");
b.Navigation("Image");
});
modelBuilder.Entity("DTO.EntityChampions", b =>
{
b.Navigation("Skills");
b.Navigation("Skins");
});
modelBuilder.Entity("EntityFramwork.EntityLargeImage", b =>
{
b.Navigation("Champion")
.IsRequired();
b.Navigation("Rune")
.IsRequired();
b.Navigation("Skin")
.IsRequired();
});
modelBuilder.Entity("EntityFramwork.EntityPageRune", b =>
{
b.Navigation("CategorieRune");
});
modelBuilder.Entity("EntityFramwork.EntityRunes", b =>
{
b.Navigation("CategorieRune");
});
#pragma warning restore 612, 618
}
}
}