Add skeleton mapping attribute

This commit is contained in:
Matt Nadareski
2023-08-10 01:06:08 -04:00
parent 887bde41d5
commit 1fb7d5097a

View File

@@ -0,0 +1,27 @@
using System;
namespace SabreTools.Models
{
/// <summary>
/// Represents a mapping to internal models
/// </summary>
[AttributeUsage(AttributeTargets.Field)]
public class MappingAttribute : Attribute
{
/// <summary>
/// Internal name for the mapping
/// </summary>
public string Name { get; set; }
/// <summary>
/// Determines if the mapped value is required or not
/// </summary>
public bool Required { get; set; }
public MappingAttribute(string name, bool required = false)
{
this.Name = name;
this.Required = required;
}
}
}