astral-api/Astral.Core/Attributes/EntityAnnotation/TableMappingAttribute.cs

27 lines
776 B
C#
Raw Normal View History

2024-12-11 21:36:30 +01:00
// <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; }
}