From 3a53d55ff4a7b14cb6f89e7399b66aa49280697a Mon Sep 17 00:00:00 2001
From: Pierre Ferreira
Date: Wed, 15 Mar 2023 17:27:20 +0100
Subject: [PATCH] =?UTF-8?q?:sparkles:=20Cr=C3=A9ation=20des=20classes=20Ru?=
=?UTF-8?q?ne,=20RunePage,=20famille=20et=20Cat=C3=A9gory?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Sources/EntityFramework/EnumCategory.cs | 18 +++++++++++++++
Sources/EntityFramework/EnumRuneFamily.cs | 15 ++++++++++++
Sources/EntityFramework/LoLDbContext.cs | 5 +++-
Sources/EntityFramework/RuneEntity.cs | 24 +++++++++++++++++++
Sources/EntityFramework/RunePageEntity.cs | 28 +++++++++++++++++++++++
5 files changed, 89 insertions(+), 1 deletion(-)
create mode 100644 Sources/EntityFramework/EnumCategory.cs
create mode 100644 Sources/EntityFramework/EnumRuneFamily.cs
create mode 100644 Sources/EntityFramework/RuneEntity.cs
create mode 100644 Sources/EntityFramework/RunePageEntity.cs
diff --git a/Sources/EntityFramework/EnumCategory.cs b/Sources/EntityFramework/EnumCategory.cs
new file mode 100644
index 0000000..8276ed2
--- /dev/null
+++ b/Sources/EntityFramework/EnumCategory.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace EntityFramework
+{
+ public enum EnumCategory
+ {
+ Major,
+ Minor1,
+ Minor2,
+ Minor3,
+ OtherMinor1,
+ OtherMinor2
+ }
+}
diff --git a/Sources/EntityFramework/EnumRuneFamily.cs b/Sources/EntityFramework/EnumRuneFamily.cs
new file mode 100644
index 0000000..cbeacc0
--- /dev/null
+++ b/Sources/EntityFramework/EnumRuneFamily.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace EntityFramework
+{
+ public enum EnumRuneFamily
+ {
+ Unknown,
+ Precision,
+ Domination
+ }
+}
diff --git a/Sources/EntityFramework/LoLDbContext.cs b/Sources/EntityFramework/LoLDbContext.cs
index 7d61851..2c4c22b 100644
--- a/Sources/EntityFramework/LoLDbContext.cs
+++ b/Sources/EntityFramework/LoLDbContext.cs
@@ -11,6 +11,10 @@ namespace EntityFramework
{
public DbSet Champions { get; set; }
+ public DbSet Rune { get; set; }
+
+ public DbSet RunePage { get; set; }
+
public LoLDbContext()
{ }
@@ -47,7 +51,6 @@ namespace EntityFramework
modelBuilder.Entity().Property(entity => entity.Icon)
.IsRequired();
-
}
}
}
diff --git a/Sources/EntityFramework/RuneEntity.cs b/Sources/EntityFramework/RuneEntity.cs
new file mode 100644
index 0000000..c9de7da
--- /dev/null
+++ b/Sources/EntityFramework/RuneEntity.cs
@@ -0,0 +1,24 @@
+using Model;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace EntityFramework
+{
+ //[Table("Rune")]
+ public class RuneEntity
+ {
+ [Key]
+ public string Name;
+
+ public string Description;
+
+ public EnumRuneFamily Family;
+
+ public LargeImage Image;
+ }
+}
diff --git a/Sources/EntityFramework/RunePageEntity.cs b/Sources/EntityFramework/RunePageEntity.cs
new file mode 100644
index 0000000..e274bbf
--- /dev/null
+++ b/Sources/EntityFramework/RunePageEntity.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using static Model.RunePage;
+
+namespace EntityFramework
+{
+ public class RunePageEntity
+ {
+ [Key]
+ public int Name { get; set; }
+
+ public Rune? Rune { get; set; }
+
+ //? voir si cela pause probleme
+ Dictionary Dico = new Dictionary();
+
+
+
+
+ public void CheckRunes(EnumCategory newRuneCategory){}
+ public void CheckFamilies(EnumCategory cat1, EnumCategory cat2){}
+ public void UpdateMajorFamily(EnumCategory minor, bool expectedValue){}
+ }
+}