using System.Xml.Serialization; namespace Domain.XML_Model { [Serializable] [XmlRoot(ElementName = "archétypes")] public class Archétype : BaseEntity { [XmlAttribute(AttributeName = "id")] public string Id { get; set; } [XmlAttribute(AttributeName = "nom")] public string? Nom { get; set; } [XmlAttribute(AttributeName = "caractéristiques")] public string? Caractéristiques { get; set; } [XmlAttribute(AttributeName = "mouvement")] public string? Mouvement { get; set; } [XmlAttribute(AttributeName = "blessures")] public int Blessures { get; set; } [XmlAttribute(AttributeName = "traits")] public string? Traits { get; set; } //[XmlAttribute(AttributeName = "traits")] //public string? TraitsAsText { // get { return (Traits.HasValue) ? Traits.ToString() : null; } // set { Traits = !string?.IsNullOrEmpty(value) ? int.Parse(value) : default(int?); } //} [XmlAttribute(AttributeName = "competences")] public string? Competences { get; set; } [XmlAttribute(AttributeName = "talents")] public string? Talents { get; set; } [XmlAttribute(AttributeName = "pouvoirs")] public string? Pouvoirs { get; set; } //[XmlAttribute(AttributeName = "pouvoirs")] //public string? PouvoirsAsText //{ // get { return (Pouvoirs.HasValue) ? Pouvoirs.ToString() : null; } // set { Pouvoirs = !string?.IsNullOrEmpty(value) ? int.Parse(value) : default(int?); } //} [XmlAttribute(AttributeName = "armures")] public string? Armures { get; set; } [XmlAttribute(AttributeName = "armes")] public string? Armes { get; set; } [XmlAttribute(AttributeName = "equipement")] public string? Equipement { get; set; } [XmlAttribute(AttributeName = "menace")] public string? Menace { get; set; } [XmlAttribute(AttributeName = "description")] public string? Description { get; set; } [XmlIgnoreAttribute] public int ArchétypeId { get; set; } } }