Création des classes Rune, RunePage, famille et Catégory
continuous-integration/drone/push Build is failing Details

pull/32/head
Pierre Ferreira 2 years ago
parent 07e7f3b3af
commit 3a53d55ff4

@ -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
}
}

@ -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
}
}

@ -11,6 +11,10 @@ namespace EntityFramework
{
public DbSet<ChampionEntity> Champions { get; set; }
public DbSet<RuneEntity> Rune { get; set; }
public DbSet<RunePageEntity> RunePage { get; set; }
public LoLDbContext()
{ }
@ -47,7 +51,6 @@ namespace EntityFramework
modelBuilder.Entity<ChampionEntity>().Property(entity => entity.Icon)
.IsRequired();
}
}
}

@ -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;
}
}

@ -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<EnumCategory, Rune> Dico = new Dictionary<EnumCategory, Rune>();
public void CheckRunes(EnumCategory newRuneCategory){}
public void CheckFamilies(EnumCategory cat1, EnumCategory cat2){}
public void UpdateMajorFamily(EnumCategory minor, bool expectedValue){}
}
}
Loading…
Cancel
Save