43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using YieldChain.Security;
|
|
|
|
namespace YLErp.DBModels.Base
|
|
{
|
|
public class DBModelBaseV4
|
|
{
|
|
public long id { get; set; }
|
|
|
|
/// <summary>
|
|
/// 加密主键
|
|
/// </summary>
|
|
[NotMapped]
|
|
public string EncryptId
|
|
{
|
|
get { return DataProtect.Encrypt(id.ToString()); }
|
|
}
|
|
|
|
public int create_user { get; set; }
|
|
public int update_user { get; set;}
|
|
public DateTime create_time { get; set; }
|
|
public DateTime update_time { get; set; }
|
|
|
|
public void SetCreator(int userId)
|
|
{
|
|
this.create_user=userId;
|
|
this.update_user=userId;
|
|
this.create_time = DateTime.Now;
|
|
this.update_time = this.create_time;
|
|
}
|
|
public void SetUpdator(int userId)
|
|
{
|
|
this.update_user = userId;
|
|
this.update_time = DateTime.Now;
|
|
}
|
|
}
|
|
}
|