From dacb7131c6f10a83191c550fed9e9ac5d7cc661c Mon Sep 17 00:00:00 2001 From: "emre.kartal" Date: Wed, 1 Mar 2023 18:55:22 +0100 Subject: [PATCH] Creation of all classes --- .../Sources/MyFlib/DataBase.db | Bin 61440 -> 73728 bytes .../Sources/MyFlib/Entities/RunePageEntity.cs | 12 + .../MyFlib/Entities/enums/CategoryEntity.cs | 18 ++ .../Sources/MyFlib/LolDbContext.cs | 6 +- ...230301171929_monNomDeMigration.Designer.cs | 276 ------------------ .../20230301171929_monNomDeMigration.cs | 175 ----------- .../Migrations/LolDbContextModelSnapshot.cs | 273 ----------------- 7 files changed, 33 insertions(+), 727 deletions(-) create mode 100644 src/EntityFramework_LoL/Sources/MyFlib/Entities/RunePageEntity.cs create mode 100644 src/EntityFramework_LoL/Sources/MyFlib/Entities/enums/CategoryEntity.cs delete mode 100644 src/EntityFramework_LoL/Sources/MyFlib/Migrations/20230301171929_monNomDeMigration.Designer.cs delete mode 100644 src/EntityFramework_LoL/Sources/MyFlib/Migrations/20230301171929_monNomDeMigration.cs delete mode 100644 src/EntityFramework_LoL/Sources/MyFlib/Migrations/LolDbContextModelSnapshot.cs diff --git a/src/EntityFramework_LoL/Sources/MyFlib/DataBase.db b/src/EntityFramework_LoL/Sources/MyFlib/DataBase.db index ec7c5b480b2fdd9a944c2c18bd76fe22b7412ccf..cb2c8bd26d01c175abe32e879db24b314e9744f3 100644 GIT binary patch delta 987 zcmZ`&T}TvB6rMY?JG-;HGk4d*Y0L7mD5^1cK~RxUIE^YN?y&`3lAGS&GjJAK^HqKA(l^GzSKL4FFnbPE z;Szh%av$O~wh09AHrs2tH8|{Q0)9N?x_;CBiP~ru!K|WXwQl2s7@f^CQO2wQpB^9hD6KE)>sPaJ&DMh4fXk6FTj9${hNHMI?lw44yaXEv= zW)TsYu<~1I4>=DFwjpMt;P{^7VBjg4iG zz>{w;frpfN1@Z2ilO87n08KLt$1N|SPO@h`7SBb%5?HtGBj5W3kd-T4Lo0EF5JEC2ui delta 431 zcmYjNO(=v>6n)RUdEYnR-~C4F85*A{F(zaD>}F%Oq%2I4jVNJEEU1ZD%w#NV6g{Qv z{H-)idJF87og__SW1+E;!epbQcu2W*Zugvf&RyK>3CZ5MR%^Xcgb+ylReY_bvpI@d zhigpp7+Exq%yFv-c}v%e=A|~M@2R>LR<@KN&C|FD*ynCC;H8YGNgW3MNfh->{Gdo34Y z%yDoo{d0jD;>?Uz7z7dsZs7>lAtAhNL%s zv3np@*cBGfebx1XuD(0lC-qgDd?SStf)99uS9pR4D9Q8%@X|{|V*$Yp6r{!Y2VKtJ YF-yWDp-O)aHVS|Tc4*l?q&9wsFB~Rsu>b%7 diff --git a/src/EntityFramework_LoL/Sources/MyFlib/Entities/RunePageEntity.cs b/src/EntityFramework_LoL/Sources/MyFlib/Entities/RunePageEntity.cs new file mode 100644 index 0000000..d23e7a0 --- /dev/null +++ b/src/EntityFramework_LoL/Sources/MyFlib/Entities/RunePageEntity.cs @@ -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 + { + } +} diff --git a/src/EntityFramework_LoL/Sources/MyFlib/Entities/enums/CategoryEntity.cs b/src/EntityFramework_LoL/Sources/MyFlib/Entities/enums/CategoryEntity.cs new file mode 100644 index 0000000..fd59784 --- /dev/null +++ b/src/EntityFramework_LoL/Sources/MyFlib/Entities/enums/CategoryEntity.cs @@ -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 + } +} diff --git a/src/EntityFramework_LoL/Sources/MyFlib/LolDbContext.cs b/src/EntityFramework_LoL/Sources/MyFlib/LolDbContext.cs index 192ebd2..9ba2246 100644 --- a/src/EntityFramework_LoL/Sources/MyFlib/LolDbContext.cs +++ b/src/EntityFramework_LoL/Sources/MyFlib/LolDbContext.cs @@ -61,9 +61,9 @@ namespace MyFlib ); //RuneEntity - modelBuilder.Entity().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().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 } ); } diff --git a/src/EntityFramework_LoL/Sources/MyFlib/Migrations/20230301171929_monNomDeMigration.Designer.cs b/src/EntityFramework_LoL/Sources/MyFlib/Migrations/20230301171929_monNomDeMigration.Designer.cs deleted file mode 100644 index 0378080..0000000 --- a/src/EntityFramework_LoL/Sources/MyFlib/Migrations/20230301171929_monNomDeMigration.Designer.cs +++ /dev/null @@ -1,276 +0,0 @@ -// -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 - { - /// - protected override void BuildTargetModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder.HasAnnotation("ProductVersion", "7.0.2"); - - modelBuilder.Entity("MyFlib.ChampionEntity", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT"); - - b.Property("Bio") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("Class") - .HasColumnType("INTEGER"); - - b.Property("Icon") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ImageId") - .HasColumnType("INTEGER"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("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("Name") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("ChampionEntityId") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("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("Name") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("ChampionForeignKey") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("Icon") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ImageId") - .HasColumnType("INTEGER"); - - b.Property("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 - } - } -} diff --git a/src/EntityFramework_LoL/Sources/MyFlib/Migrations/20230301171929_monNomDeMigration.cs b/src/EntityFramework_LoL/Sources/MyFlib/Migrations/20230301171929_monNomDeMigration.cs deleted file mode 100644 index 6ff02ea..0000000 --- a/src/EntityFramework_LoL/Sources/MyFlib/Migrations/20230301171929_monNomDeMigration.cs +++ /dev/null @@ -1,175 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional - -namespace MyFlib.Migrations -{ - /// - public partial class monNomDeMigration : Migration - { - /// - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "LargeImageEntity", - columns: table => new - { - Id = table.Column(type: "INTEGER", nullable: false) - .Annotation("Sqlite:Autoincrement", true), - Base64 = table.Column(type: "TEXT", nullable: false) - }, - constraints: table => - { - table.PrimaryKey("PK_LargeImageEntity", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Champions", - columns: table => new - { - Id = table.Column(type: "TEXT", nullable: false), - Name = table.Column(type: "TEXT", maxLength: 64, nullable: false), - Bio = table.Column(type: "TEXT", maxLength: 255, nullable: false), - Icon = table.Column(type: "TEXT", nullable: false), - Class = table.Column(type: "INTEGER", nullable: false), - ImageId = table.Column(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(type: "TEXT", maxLength: 256, nullable: false), - Description = table.Column(type: "TEXT", maxLength: 500, nullable: false), - Type = table.Column(type: "INTEGER", nullable: false), - ChampionEntityId = table.Column(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(type: "TEXT", maxLength: 256, nullable: false), - Description = table.Column(type: "TEXT", maxLength: 500, nullable: false), - Icon = table.Column(type: "TEXT", nullable: false), - Price = table.Column(type: "REAL", nullable: false), - ChampionForeignKey = table.Column(type: "TEXT", nullable: false), - ImageId = table.Column(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"); - } - - /// - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Skills"); - - migrationBuilder.DropTable( - name: "Skins"); - - migrationBuilder.DropTable( - name: "Champions"); - - migrationBuilder.DropTable( - name: "LargeImageEntity"); - } - } -} diff --git a/src/EntityFramework_LoL/Sources/MyFlib/Migrations/LolDbContextModelSnapshot.cs b/src/EntityFramework_LoL/Sources/MyFlib/Migrations/LolDbContextModelSnapshot.cs deleted file mode 100644 index f0dd4a8..0000000 --- a/src/EntityFramework_LoL/Sources/MyFlib/Migrations/LolDbContextModelSnapshot.cs +++ /dev/null @@ -1,273 +0,0 @@ -// -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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("TEXT"); - - b.Property("Bio") - .IsRequired() - .HasMaxLength(255) - .HasColumnType("TEXT"); - - b.Property("Class") - .HasColumnType("INTEGER"); - - b.Property("Icon") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ImageId") - .HasColumnType("INTEGER"); - - b.Property("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("Id") - .ValueGeneratedOnAdd() - .HasColumnType("INTEGER"); - - b.Property("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("Name") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("ChampionEntityId") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("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("Name") - .HasMaxLength(256) - .HasColumnType("TEXT"); - - b.Property("ChampionForeignKey") - .HasColumnType("TEXT"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(500) - .HasColumnType("TEXT"); - - b.Property("Icon") - .IsRequired() - .HasColumnType("TEXT"); - - b.Property("ImageId") - .HasColumnType("INTEGER"); - - b.Property("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 - } - } -}