diff --git a/SabreTools.Models/MappingAttribute.cs b/SabreTools.Models/MappingAttribute.cs new file mode 100644 index 00000000..46e64d46 --- /dev/null +++ b/SabreTools.Models/MappingAttribute.cs @@ -0,0 +1,27 @@ +using System; + +namespace SabreTools.Models +{ + /// + /// Represents a mapping to internal models + /// + [AttributeUsage(AttributeTargets.Field)] + public class MappingAttribute : Attribute + { + /// + /// Internal name for the mapping + /// + public string Name { get; set; } + + /// + /// Determines if the mapped value is required or not + /// + public bool Required { get; set; } + + public MappingAttribute(string name, bool required = false) + { + this.Name = name; + this.Required = required; + } + } +} \ No newline at end of file