From 1fb7d5097a49bc724e05c55b70b6013dc783d96e Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 10 Aug 2023 01:06:08 -0400 Subject: [PATCH] Add skeleton mapping attribute --- SabreTools.Models/MappingAttribute.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 SabreTools.Models/MappingAttribute.cs 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