26 lines
554 B
C#
26 lines
554 B
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using YieldChain.Security;
|
|
|
|
namespace YLErp.DBModels
|
|
{
|
|
/// <summary>
|
|
/// 数据模型基类
|
|
/// </summary>
|
|
[Serializable]
|
|
public abstract class DBModelBase
|
|
{
|
|
[Key]
|
|
public virtual int id { get; set; }
|
|
|
|
/// <summary>
|
|
/// 加密主键
|
|
/// </summary>
|
|
[NotMapped]
|
|
public string EncryptId
|
|
{
|
|
get { return DataProtect.Encrypt(id.ToString()); }
|
|
}
|
|
}
|
|
}
|