EntityBase.cs 1.7 KB

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