26 lines
776 B
C#
26 lines
776 B
C#
// <copyright file="TableMappingAttribute.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 database table name for this entity.
|
|
/// </summary>
|
|
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
|
|
public class TableMappingAttribute : Attribute
|
|
{
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="TableMappingAttribute" /> class.
|
|
/// </summary>
|
|
/// <param name="name">The database table name.</param>
|
|
public TableMappingAttribute(string name)
|
|
{
|
|
Name = name;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Database table name.
|
|
/// </summary>
|
|
public string Name { get; }
|
|
}
|