using System.Xml.Serialization;
using Newtonsoft.Json;
namespace SabreTools.Models.Internal
{
///
/// Format-agnostic representation of item data
///
public class DatItem : DictionaryBase
{
#region Common Keys
public const string TypeKey = "_type";
#endregion
///
/// Quick accessor to item type, if it exists
///
[JsonProperty("itemtype", DefaultValueHandling = DefaultValueHandling.Ignore), XmlElement("itemtype")]
public ItemType? Type
{
get => ContainsKey(TypeKey) ? this[TypeKey] as ItemType? : null;
set => this[TypeKey] = value;
}
}
}