You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1008 B

using Model;
using System.Collections.Immutable;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace EFlib
{
public class EFChampion
{
/**** Only Attributs ****/
[Key]
[MaxLength(256)]
public string Name { get; set; }
[MaxLength(500)]
public string Bio { get; set; }
public string Icon { get; set; }
public List<KeyValuePair<string, int>> CharacteristicsList { get; set; }
public ReadOnlyDictionary<string, int> Characteristics => new ReadOnlyDictionary<string, int>(CharacteristicsList.ToDictionary(kv => kv.Key, kv => kv.Value));
[Required]
public ChampionClass Class { get; set; }
public ReadOnlyCollection<EFSkin> Skins { get; private set; }
public ImmutableHashSet<EFSkill> Skills { get; private set; }
[ForeignKey("ImageId")]
public EFLargeImage Image { get; set; }
}
}