EntityBase.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. //[DatabaseGenerated(DatabaseGeneratedOption.None)]
  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. [SugarColumn(IsNullable =true,ColumnDataType ="varchar(500)")]
  39. public string Remark { get; set; }
  40. /// <summary>
  41. /// 是否删除
  42. /// </summary>
  43. [SugarColumn(ColumnDescription = "是否删除", IsNullable = true, ColumnDataType = "int")]
  44. public int IsDel { get; set; } = 0;
  45. }
  46. }