19 lines
426 B
C#
19 lines
426 B
C#
using SqlSugar;
|
|
using Tnb;
|
|
|
|
namespace JNPF.Common.Contracts;
|
|
|
|
public class BaseEntity<TKey> : Entity, IEntity where TKey : IEquatable<TKey>
|
|
{
|
|
/// <summary>
|
|
/// 获取或设置 编号.
|
|
/// </summary>
|
|
[SugarColumn(ColumnName = "id", ColumnDescription = "主键", IsPrimaryKey = true)]
|
|
public TKey id { get; set; }
|
|
|
|
public override object[] GetKeys()
|
|
{
|
|
return new object[] { id };
|
|
}
|
|
}
|