EntityBase.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using OASystem.Domain.Attributes;
  2. using System.ComponentModel.DataAnnotations.Schema;
  3. namespace OASystem.Domain.Entities
  4. {
  5. /// <summary>
  6. /// 实体基类
  7. /// </summary>
  8. public class EntityBase
  9. {
  10. /// <summary>
  11. /// 编号
  12. /// </summary>
  13. [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, IsNullable = false)]
  14. public int Id { get; set; }
  15. /// <summary>
  16. /// 创建者Id
  17. /// </summary>
  18. [SugarColumn(ColumnDescription = "创建者Id", IsNullable = true, ColumnDataType = "int")]
  19. public int CreateUserId { get; set; }
  20. /// <summary>
  21. /// 创建时间
  22. /// </summary>
  23. [SugarColumn(ColumnDescription = "创建时间", IsNullable = true, ColumnDataType = "DateTime")]
  24. public DateTime CreateTime { get; set; } = DateTime.Now;
  25. /// <summary>
  26. /// 删除者Id
  27. /// </summary>
  28. [SugarColumn(ColumnDescription = "删除者Id", IsNullable = true, ColumnDataType = "int")]
  29. public int? DeleteUserId { get; set; }
  30. /// <summary>
  31. /// 删除时间
  32. /// </summary>
  33. [SugarColumn(ColumnDescription = "删除时间", IsNullable = true, ColumnDataType = "varchar(30)")]
  34. public string DeleteTime { get; set; }
  35. /// <summary>
  36. /// 备注
  37. /// </summary>
  38. [Encrypted]
  39. [SugarColumn(IsNullable = true, ColumnDataType = "varchar(500)")]
  40. public string Remark { get; set; }
  41. /// <summary>
  42. /// 是否删除
  43. /// </summary>
  44. [SugarColumn(ColumnDescription = "是否删除", IsNullable = true, ColumnDataType = "int")]
  45. public int IsDel { get; set; } = 0;
  46. }
  47. }