Mise à jour de 'EntityFramework_LoL/Sources/DTO/ChampionDTO.cs'
continuous-integration/drone/push Build is passing Details

master
David D'ALMEIDA 2 years ago
parent c1dbb0c469
commit 5b5fbc4e29

@ -1,74 +1,47 @@
using Model; using Model;
using Shared; using Shared;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
using static System.Net.Mime.MediaTypeNames; using static System.Net.Mime.MediaTypeNames;
namespace DTO namespace DTO
{ {
public class ChampionDTO public class ChampionDTO
{ {
public string Name { get; set; } public string Name { get; set; }
public string Bio { get; set; } public string Bio { get; set; }
public string Icon { get; set; } public string Icon { get; set; }
public ChampionClass Class { get; set; } public ChampionClass Class { get; set; }
} }
public class ChampionFullDTO
/*public class ChampionFullDTO {
{
*//*[Required(ErrorMessage = "Name is required")] [JsonPropertyName("characteristics")]
[StringLength(60, ErrorMessage = "Name can't be longer than 60 characters")]*//* public ReadOnlyDictionary<string, int> Characteristics { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; } [JsonPropertyName("name")]
[JsonPropertyName("bio")] public string Name { get; set; }
public string Bio { get; set; }
[JsonPropertyName("bio")]
public ChampionClass Class {get; set;} public string Bio { get; set; }
public string Icon {get; set;}
[JsonPropertyName("class")]
public ReadOnlyDictionary<string, int> Characteristics { get; set; } public ChampionClass Class { get; set; }
public ImageDTO LargeImage { get; set; }
[JsonPropertyName("icon")]
public IEnumerable<SkinDto> skins { get; set; } public string Icon { get; set; }
public IEnumerable<Skill> skills { get; set; }
public ChampionFullDTO() [JsonPropertyName("largeImage")]
{ public ImageDTO LargeImage { get; set; }
Characteristics = new ReadOnlyDictionary<string, int>(new Dictionary<string, int>());
} [JsonPropertyName("skins")]
public IEnumerable<SkinDto> Skins { get; set; }
} [JsonPropertyName("skills")]
*/ public IEnumerable<Skill> Skills { get; set; }
public class ChampionFullDTO }
{
[JsonPropertyName("characteristics")]
public ReadOnlyDictionary<string, int> 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<SkinDto> Skins { get; set; }
[JsonPropertyName("skills")]
public IEnumerable<Skill> Skills { get; set; }
}
} }
Loading…
Cancel
Save