Files
mixtape/Finch/Utils/GenerateIdAttribute.cs
T
2026-04-07 14:23:29 +02:00

18 lines
412 B
C#

namespace Finch.Utils;
/// <summary>
/// Automatically generate ID with the specified length and insert it into this property on entity save
/// </summary>
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class GenerateIdAttribute : Attribute
{
public int? Length = null;
public GenerateIdAttribute(int length)
{
Length = length;
}
public GenerateIdAttribute() { }
}