BaseEntity.cs 834 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. using Yitter.IdGenerator;
  2. namespace ERP.Framework.WebApi
  3. {
  4. public abstract class BaseEntity
  5. {
  6. public BaseEntity()
  7. {
  8. this.Id = YitIdHelper.NextId();
  9. }
  10. /// <summary>
  11. /// 主键Id
  12. /// </summary>
  13. public virtual long Id { get; set; }
  14. /// <summary>
  15. /// 创建时间
  16. /// </summary>
  17. public virtual DateTime CreateTime { get; set; }
  18. /// <summary>
  19. /// 创建人
  20. /// </summary>
  21. public virtual string CreateBy { get; set; } = string.Empty;
  22. /// <summary>
  23. /// 更新时间
  24. /// </summary>
  25. public virtual DateTime? UpdateTime { get; set; }
  26. /// <summary>
  27. /// 更新人
  28. /// </summary>
  29. public virtual string? UpdateBy { get; set; }
  30. }
  31. }