Creation of all classes
continuous-integration/drone/push Build is passing Details

pull/6/head
Emre KARTAL 2 years ago
parent 4ccbd68454
commit dacb7131c6

@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MyFlib.Entities
{
public class RunePageEntity
{
}
}

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MyFlib.Entities.enums
{
enum CategoryEntity
{
Major,
Minor1,
Minor2,
Minor3,
OtherMinor1,
OtherMinor2
}
}

@ -61,9 +61,9 @@ namespace MyFlib
);
//RuneEntity
modelBuilder.Entity<SkinEntity>().HasData(
new SkinEntity { Name = "Akali Infernale", ChampionForeignKey = Guid.Parse("{4422C524-B2CB-43EF-8263-990C3CEA7CAE}"), Description = "Djinn qu'on invoque en dessous du monde, l'Infernale connue sous le nom d'Akali réduira en cendres les ennemis de son maître… mais le prix de son service est toujours exorbitant.", Icon = "empty", Price = 520, ImageId = 1 },
new SkinEntity { Name = "Akshan Cyberpop", ChampionForeignKey = Guid.Parse("{3708dcfd-02a1-491e-b4f7-e75bf274cf23}"), Description = "Les bas-fonds d'Audio City ont un nouveau héros : le Rebelle fluo. Cette position, Akshan la doit à son courage, sa sagesse et sa capacité à s'infiltrer dans des bâtiments d'affaires hautement sécurisés, et ce, sans être repéré. Son charme ravageur l'a aussi beaucoup aidé.", Icon = "empty", Price = 1350, ImageId = 2 }
modelBuilder.Entity<RuneEntity>().HasData(
new RuneEntity { Name = "Hextech Flashtraption ", Description = "While Flash is on cooldown, it is replaced by Hexflash.", SkillType = SkillTypeEntity.Passive, ImageId = 1 },
new RuneEntity { Name = "Manaflow Band ", Description = "Hitting enemy champions with a spell grants 25 maximum mana, up to 250 mana.", SkillType = SkillTypeEntity.Basic, ImageId = 2 }
);
}

@ -1,276 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using MyFlib;
#nullable disable
namespace MyFlib.Migrations
{
[DbContext(typeof(LolDbContext))]
[Migration("20230301171929_monNomDeMigration")]
partial class monNomDeMigration
{
/// <inheritdoc />
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
modelBuilder.Entity("MyFlib.ChampionEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<string>("Bio")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("TEXT");
b.Property<int>("Class")
.HasColumnType("INTEGER");
b.Property<string>("Icon")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("ImageId")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ImageId");
b.ToTable("Champions");
b.HasData(
new
{
Id = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
Bio = "",
Class = 1,
Icon = "",
ImageId = 1,
Name = "Akali"
},
new
{
Id = new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"),
Bio = "",
Class = 2,
Icon = "",
ImageId = 2,
Name = "Aatrox"
},
new
{
Id = new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"),
Bio = "",
Class = 3,
Icon = "",
ImageId = 1,
Name = "Ahri"
},
new
{
Id = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
Bio = "",
Class = 4,
Icon = "",
ImageId = 1,
Name = "Akshan"
},
new
{
Id = new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"),
Bio = "",
Class = 5,
Icon = "",
ImageId = 1,
Name = "Bard"
},
new
{
Id = new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"),
Bio = "",
Class = 6,
Icon = "",
ImageId = 1,
Name = "Alistar"
});
});
modelBuilder.Entity("MyFlib.LargeImageEntity", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Base64")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("LargeImageEntity");
b.HasData(
new
{
Id = 1,
Base64 = "empty"
},
new
{
Id = 2,
Base64 = " "
});
});
modelBuilder.Entity("MyFlib.SkillEntity", b =>
{
b.Property<string>("Name")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<Guid?>("ChampionEntityId")
.HasColumnType("TEXT");
b.Property<string>("Description")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property<int>("Type")
.HasColumnType("INTEGER");
b.HasKey("Name");
b.HasIndex("ChampionEntityId");
b.ToTable("Skills");
b.HasData(
new
{
Name = "Boule de feu",
Description = "Fire!",
Type = 1
},
new
{
Name = "White Star",
Description = "Random damage",
Type = 3
});
});
modelBuilder.Entity("MyFlib.SkinEntity", b =>
{
b.Property<string>("Name")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<Guid>("ChampionForeignKey")
.HasColumnType("TEXT");
b.Property<string>("Description")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property<string>("Icon")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("ImageId")
.HasColumnType("INTEGER");
b.Property<float>("Price")
.HasColumnType("REAL");
b.HasKey("Name");
b.HasIndex("ChampionForeignKey");
b.HasIndex("ImageId");
b.ToTable("Skins");
b.HasData(
new
{
Name = "Akali Infernale",
ChampionForeignKey = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
Description = "Djinn qu'on invoque en dessous du monde, l'Infernale connue sous le nom d'Akali réduira en cendres les ennemis de son maître… mais le prix de son service est toujours exorbitant.",
Icon = "empty",
ImageId = 1,
Price = 520f
},
new
{
Name = "Akshan Cyberpop",
ChampionForeignKey = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
Description = "Les bas-fonds d'Audio City ont un nouveau héros : le Rebelle fluo. Cette position, Akshan la doit à son courage, sa sagesse et sa capacité à s'infiltrer dans des bâtiments d'affaires hautement sécurisés, et ce, sans être repéré. Son charme ravageur l'a aussi beaucoup aidé.",
Icon = "empty",
ImageId = 2,
Price = 1350f
});
});
modelBuilder.Entity("MyFlib.ChampionEntity", b =>
{
b.HasOne("MyFlib.LargeImageEntity", "Image")
.WithMany()
.HasForeignKey("ImageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Image");
});
modelBuilder.Entity("MyFlib.SkillEntity", b =>
{
b.HasOne("MyFlib.ChampionEntity", null)
.WithMany("Skills")
.HasForeignKey("ChampionEntityId");
});
modelBuilder.Entity("MyFlib.SkinEntity", b =>
{
b.HasOne("MyFlib.ChampionEntity", "Champion")
.WithMany("Skins")
.HasForeignKey("ChampionForeignKey")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("MyFlib.LargeImageEntity", "Image")
.WithMany()
.HasForeignKey("ImageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Champion");
b.Navigation("Image");
});
modelBuilder.Entity("MyFlib.ChampionEntity", b =>
{
b.Navigation("Skills");
b.Navigation("Skins");
});
#pragma warning restore 612, 618
}
}
}

@ -1,175 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace MyFlib.Migrations
{
/// <inheritdoc />
public partial class monNomDeMigration : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "LargeImageEntity",
columns: table => new
{
Id = table.Column<int>(type: "INTEGER", nullable: false)
.Annotation("Sqlite:Autoincrement", true),
Base64 = table.Column<string>(type: "TEXT", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_LargeImageEntity", x => x.Id);
});
migrationBuilder.CreateTable(
name: "Champions",
columns: table => new
{
Id = table.Column<Guid>(type: "TEXT", nullable: false),
Name = table.Column<string>(type: "TEXT", maxLength: 64, nullable: false),
Bio = table.Column<string>(type: "TEXT", maxLength: 255, nullable: false),
Icon = table.Column<string>(type: "TEXT", nullable: false),
Class = table.Column<int>(type: "INTEGER", nullable: false),
ImageId = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Champions", x => x.Id);
table.ForeignKey(
name: "FK_Champions_LargeImageEntity_ImageId",
column: x => x.ImageId,
principalTable: "LargeImageEntity",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "Skills",
columns: table => new
{
Name = table.Column<string>(type: "TEXT", maxLength: 256, nullable: false),
Description = table.Column<string>(type: "TEXT", maxLength: 500, nullable: false),
Type = table.Column<int>(type: "INTEGER", nullable: false),
ChampionEntityId = table.Column<Guid>(type: "TEXT", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Skills", x => x.Name);
table.ForeignKey(
name: "FK_Skills_Champions_ChampionEntityId",
column: x => x.ChampionEntityId,
principalTable: "Champions",
principalColumn: "Id");
});
migrationBuilder.CreateTable(
name: "Skins",
columns: table => new
{
Name = table.Column<string>(type: "TEXT", maxLength: 256, nullable: false),
Description = table.Column<string>(type: "TEXT", maxLength: 500, nullable: false),
Icon = table.Column<string>(type: "TEXT", nullable: false),
Price = table.Column<float>(type: "REAL", nullable: false),
ChampionForeignKey = table.Column<Guid>(type: "TEXT", nullable: false),
ImageId = table.Column<int>(type: "INTEGER", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Skins", x => x.Name);
table.ForeignKey(
name: "FK_Skins_Champions_ChampionForeignKey",
column: x => x.ChampionForeignKey,
principalTable: "Champions",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Skins_LargeImageEntity_ImageId",
column: x => x.ImageId,
principalTable: "LargeImageEntity",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.InsertData(
table: "LargeImageEntity",
columns: new[] { "Id", "Base64" },
values: new object[,]
{
{ 1, "empty" },
{ 2, " " }
});
migrationBuilder.InsertData(
table: "Skills",
columns: new[] { "Name", "ChampionEntityId", "Description", "Type" },
values: new object[,]
{
{ "Boule de feu", null, "Fire!", 1 },
{ "White Star", null, "Random damage", 3 }
});
migrationBuilder.InsertData(
table: "Champions",
columns: new[] { "Id", "Bio", "Class", "Icon", "ImageId", "Name" },
values: new object[,]
{
{ new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"), "", 6, "", 1, "Alistar" },
{ new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"), "", 4, "", 1, "Akshan" },
{ new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"), "", 1, "", 1, "Akali" },
{ new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"), "", 5, "", 1, "Bard" },
{ new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"), "", 2, "", 2, "Aatrox" },
{ new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"), "", 3, "", 1, "Ahri" }
});
migrationBuilder.InsertData(
table: "Skins",
columns: new[] { "Name", "ChampionForeignKey", "Description", "Icon", "ImageId", "Price" },
values: new object[,]
{
{ "Akali Infernale", new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"), "Djinn qu'on invoque en dessous du monde, l'Infernale connue sous le nom d'Akali réduira en cendres les ennemis de son maître… mais le prix de son service est toujours exorbitant.", "empty", 1, 520f },
{ "Akshan Cyberpop", new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"), "Les bas-fonds d'Audio City ont un nouveau héros : le Rebelle fluo. Cette position, Akshan la doit à son courage, sa sagesse et sa capacité à s'infiltrer dans des bâtiments d'affaires hautement sécurisés, et ce, sans être repéré. Son charme ravageur l'a aussi beaucoup aidé.", "empty", 2, 1350f }
});
migrationBuilder.CreateIndex(
name: "IX_Champions_ImageId",
table: "Champions",
column: "ImageId");
migrationBuilder.CreateIndex(
name: "IX_Skills_ChampionEntityId",
table: "Skills",
column: "ChampionEntityId");
migrationBuilder.CreateIndex(
name: "IX_Skins_ChampionForeignKey",
table: "Skins",
column: "ChampionForeignKey");
migrationBuilder.CreateIndex(
name: "IX_Skins_ImageId",
table: "Skins",
column: "ImageId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Skills");
migrationBuilder.DropTable(
name: "Skins");
migrationBuilder.DropTable(
name: "Champions");
migrationBuilder.DropTable(
name: "LargeImageEntity");
}
}
}

@ -1,273 +0,0 @@
// <auto-generated />
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using MyFlib;
#nullable disable
namespace MyFlib.Migrations
{
[DbContext(typeof(LolDbContext))]
partial class LolDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder.HasAnnotation("ProductVersion", "7.0.2");
modelBuilder.Entity("MyFlib.ChampionEntity", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("TEXT");
b.Property<string>("Bio")
.IsRequired()
.HasMaxLength(255)
.HasColumnType("TEXT");
b.Property<int>("Class")
.HasColumnType("INTEGER");
b.Property<string>("Icon")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("ImageId")
.HasColumnType("INTEGER");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("TEXT");
b.HasKey("Id");
b.HasIndex("ImageId");
b.ToTable("Champions");
b.HasData(
new
{
Id = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
Bio = "",
Class = 1,
Icon = "",
ImageId = 1,
Name = "Akali"
},
new
{
Id = new Guid("a4f84d92-c20f-4f2d-b3f9-ca00ef556e72"),
Bio = "",
Class = 2,
Icon = "",
ImageId = 2,
Name = "Aatrox"
},
new
{
Id = new Guid("ae5fe535-f041-445e-b570-28b75bc78cb9"),
Bio = "",
Class = 3,
Icon = "",
ImageId = 1,
Name = "Ahri"
},
new
{
Id = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
Bio = "",
Class = 4,
Icon = "",
ImageId = 1,
Name = "Akshan"
},
new
{
Id = new Guid("7f7746fa-b1cb-49da-9409-4b3e6910500e"),
Bio = "",
Class = 5,
Icon = "",
ImageId = 1,
Name = "Bard"
},
new
{
Id = new Guid("36ad2a82-d17b-47de-8a95-6e154a7df557"),
Bio = "",
Class = 6,
Icon = "",
ImageId = 1,
Name = "Alistar"
});
});
modelBuilder.Entity("MyFlib.LargeImageEntity", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("INTEGER");
b.Property<string>("Base64")
.IsRequired()
.HasColumnType("TEXT");
b.HasKey("Id");
b.ToTable("LargeImageEntity");
b.HasData(
new
{
Id = 1,
Base64 = "empty"
},
new
{
Id = 2,
Base64 = " "
});
});
modelBuilder.Entity("MyFlib.SkillEntity", b =>
{
b.Property<string>("Name")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<Guid?>("ChampionEntityId")
.HasColumnType("TEXT");
b.Property<string>("Description")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property<int>("Type")
.HasColumnType("INTEGER");
b.HasKey("Name");
b.HasIndex("ChampionEntityId");
b.ToTable("Skills");
b.HasData(
new
{
Name = "Boule de feu",
Description = "Fire!",
Type = 1
},
new
{
Name = "White Star",
Description = "Random damage",
Type = 3
});
});
modelBuilder.Entity("MyFlib.SkinEntity", b =>
{
b.Property<string>("Name")
.HasMaxLength(256)
.HasColumnType("TEXT");
b.Property<Guid>("ChampionForeignKey")
.HasColumnType("TEXT");
b.Property<string>("Description")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("TEXT");
b.Property<string>("Icon")
.IsRequired()
.HasColumnType("TEXT");
b.Property<int>("ImageId")
.HasColumnType("INTEGER");
b.Property<float>("Price")
.HasColumnType("REAL");
b.HasKey("Name");
b.HasIndex("ChampionForeignKey");
b.HasIndex("ImageId");
b.ToTable("Skins");
b.HasData(
new
{
Name = "Akali Infernale",
ChampionForeignKey = new Guid("4422c524-b2cb-43ef-8263-990c3cea7cae"),
Description = "Djinn qu'on invoque en dessous du monde, l'Infernale connue sous le nom d'Akali réduira en cendres les ennemis de son maître… mais le prix de son service est toujours exorbitant.",
Icon = "empty",
ImageId = 1,
Price = 520f
},
new
{
Name = "Akshan Cyberpop",
ChampionForeignKey = new Guid("3708dcfd-02a1-491e-b4f7-e75bf274cf23"),
Description = "Les bas-fonds d'Audio City ont un nouveau héros : le Rebelle fluo. Cette position, Akshan la doit à son courage, sa sagesse et sa capacité à s'infiltrer dans des bâtiments d'affaires hautement sécurisés, et ce, sans être repéré. Son charme ravageur l'a aussi beaucoup aidé.",
Icon = "empty",
ImageId = 2,
Price = 1350f
});
});
modelBuilder.Entity("MyFlib.ChampionEntity", b =>
{
b.HasOne("MyFlib.LargeImageEntity", "Image")
.WithMany()
.HasForeignKey("ImageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Image");
});
modelBuilder.Entity("MyFlib.SkillEntity", b =>
{
b.HasOne("MyFlib.ChampionEntity", null)
.WithMany("Skills")
.HasForeignKey("ChampionEntityId");
});
modelBuilder.Entity("MyFlib.SkinEntity", b =>
{
b.HasOne("MyFlib.ChampionEntity", "Champion")
.WithMany("Skins")
.HasForeignKey("ChampionForeignKey")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("MyFlib.LargeImageEntity", "Image")
.WithMany()
.HasForeignKey("ImageId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Champion");
b.Navigation("Image");
});
modelBuilder.Entity("MyFlib.ChampionEntity", b =>
{
b.Navigation("Skills");
b.Navigation("Skins");
});
#pragma warning restore 612, 618
}
}
}
Loading…
Cancel
Save