using System; namespace Kean.Infrastructure.Database { /// /// 表示对象的唯一标识 /// [AttributeUsage(AttributeTargets.Property)] public sealed class IdentifierAttribute : Attribute { /// /// 构造函数 /// public IdentifierAttribute() => Increment = false; /// /// 构造函数 /// /// 是否自增 public IdentifierAttribute(bool increment) => Increment = increment; /// /// 获取主键是否是自增主键 /// public bool Increment { get; } } }