astral-api/Astral.Core/Attributes/EntityAnnotation/ColumnMappingAttribute.cs
2024-12-11 20:36:30 +00:00

26 lines
765 B
C#

// <copyright file="ColumnMappingAttribute.cs" company="alveus.dev">
// Copyright (c) alveus.dev. All rights reserved. Licensed under the MIT License.
// </copyright>
namespace Astral.Core.Attributes.EntityAnnotation;
/// <summary>
/// Define the column name this property relates to.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class ColumnMappingAttribute : Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="ColumnMappingAttribute" /> class.
/// </summary>
/// <param name="name">Database column name.</param>
public ColumnMappingAttribute(string name)
{
Name = name;
}
/// <summary>
/// Database table column name.
/// </summary>
public string Name { get; }
}