diff --git a/EntityFramework_LoL/Sources/DTO/ChampionDTO.cs b/EntityFramework_LoL/Sources/DTO/ChampionDTO.cs index a1766a2..3b1d566 100644 --- a/EntityFramework_LoL/Sources/DTO/ChampionDTO.cs +++ b/EntityFramework_LoL/Sources/DTO/ChampionDTO.cs @@ -1,74 +1,47 @@ -using Model; -using Shared; -using System.Collections.ObjectModel; -using System.ComponentModel.DataAnnotations; -using System.Text.Json.Serialization; -using static System.Net.Mime.MediaTypeNames; - -namespace DTO -{ - public class ChampionDTO - { - public string Name { get; set; } - public string Bio { get; set; } - public string Icon { get; set; } - public ChampionClass Class { get; set; } - } - - - /*public class ChampionFullDTO - { - *//*[Required(ErrorMessage = "Name is required")] - [StringLength(60, ErrorMessage = "Name can't be longer than 60 characters")]*//* - [JsonPropertyName("name")] - public string Name { get; set; } - [JsonPropertyName("bio")] - public string Bio { get; set; } - - public ChampionClass Class {get; set;} - public string Icon {get; set;} - - public ReadOnlyDictionary Characteristics { get; set; } - public ImageDTO LargeImage { get; set; } - - public IEnumerable skins { get; set; } - public IEnumerable skills { get; set; } - - public ChampionFullDTO() - { - Characteristics = new ReadOnlyDictionary(new Dictionary()); - } - - - } -*/ - public class ChampionFullDTO - { - - [JsonPropertyName("characteristics")] - public ReadOnlyDictionary Characteristics { get; set; } - - [JsonPropertyName("name")] - public string Name { get; set; } - - [JsonPropertyName("bio")] - public string Bio { get; set; } - - [JsonPropertyName("class")] - public ChampionClass Class { get; set; } - - [JsonPropertyName("icon")] - public string Icon { get; set; } - - - [JsonPropertyName("largeImage")] - public ImageDTO LargeImage { get; set; } - - [JsonPropertyName("skins")] - public IEnumerable Skins { get; set; } - - [JsonPropertyName("skills")] - public IEnumerable Skills { get; set; } - } - +using Model; +using Shared; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.Text.Json.Serialization; +using static System.Net.Mime.MediaTypeNames; + +namespace DTO +{ + public class ChampionDTO + { + public string Name { get; set; } + public string Bio { get; set; } + public string Icon { get; set; } + public ChampionClass Class { get; set; } + } + + public class ChampionFullDTO + { + + [JsonPropertyName("characteristics")] + public ReadOnlyDictionary Characteristics { get; set; } + + [JsonPropertyName("name")] + public string Name { get; set; } + + [JsonPropertyName("bio")] + public string Bio { get; set; } + + [JsonPropertyName("class")] + public ChampionClass Class { get; set; } + + [JsonPropertyName("icon")] + public string Icon { get; set; } + + + [JsonPropertyName("largeImage")] + public ImageDTO LargeImage { get; set; } + + [JsonPropertyName("skins")] + public IEnumerable Skins { get; set; } + + [JsonPropertyName("skills")] + public IEnumerable Skills { get; set; } + } + } \ No newline at end of file