26 lines
765 B
C#
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; }
|
|
}
|