平安校园
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

94 satır
2.6 KiB

  1. //
  2. namespace SafeCampus.SqlSugar;
  3. /// <summary>
  4. /// 主键实体基类
  5. /// </summary>
  6. public abstract class PrimaryKeyEntity
  7. {
  8. /// <summary>
  9. /// 主键Id
  10. /// </summary>
  11. [SugarColumn(ColumnDescription = "Id", IsPrimaryKey = true)]
  12. public virtual long Id { get; set; }
  13. /// <summary>
  14. /// 拓展信息
  15. /// </summary>
  16. [SugarColumn(ColumnName = "ExtJson", ColumnDescription = "扩展信息", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)]
  17. public virtual string ExtJson { get; set; }
  18. }
  19. /// <summary>
  20. /// 框架实体基类
  21. /// </summary>
  22. public class BaseEntity : PrimaryKeyEntity
  23. {
  24. [SugarColumn(ColumnName = "Status", ColumnDescription = "状态", Length = 20, DefaultValue = CommonStatusConst.ENABLE,
  25. IsNullable = true)]
  26. public virtual string Status { get; set; }
  27. /// <summary>
  28. /// 创建时间
  29. /// </summary>
  30. [SugarColumn(ColumnDescription = "创建时间", IsOnlyIgnoreUpdate = true, IsNullable = true)]
  31. public virtual DateTime? CreateTime { get; set; }
  32. /// <summary>
  33. /// 更新时间
  34. /// </summary>
  35. [SugarColumn(ColumnDescription = "更新时间", IsOnlyIgnoreInsert = true, IsNullable = true)]
  36. public virtual DateTime? UpdateTime { get; set; }
  37. /// <summary>
  38. /// 创建者Id
  39. /// </summary>
  40. [SugarColumn(ColumnDescription = "创建者Id", IsOnlyIgnoreUpdate = true, IsNullable = true)]
  41. public virtual long? CreateUserId { get; set; }
  42. /// <summary>
  43. /// 修改者Id
  44. /// </summary>
  45. [SugarColumn(ColumnDescription = "修改者Id", IsOnlyIgnoreInsert = true, IsNullable = true)]
  46. public virtual long? UpdateUserId { get; set; }
  47. /// <summary>
  48. /// 创建人
  49. /// </summary>
  50. [SugarColumn(ColumnDescription = "创建人", IsOnlyIgnoreUpdate = true, IsNullable = true)]
  51. public virtual string CreateUser { get; set; }
  52. /// <summary>
  53. /// 更新人
  54. /// </summary>
  55. [SugarColumn(ColumnDescription = "更新人", IsOnlyIgnoreInsert = true, IsNullable = true)]
  56. public virtual string UpdateUser { get; set; }
  57. /// <summary>
  58. /// 软删除
  59. /// </summary>
  60. [SugarColumn(ColumnDescription = "软删除", IsNullable = true)]
  61. public virtual bool IsDelete { get; set; }
  62. }
  63. /// <summary>
  64. /// 业务数据实体基类(数据权限)
  65. /// </summary>
  66. public abstract class DataEntityBase : BaseEntity
  67. {
  68. /// <summary>
  69. /// 创建者部门Id
  70. /// </summary>
  71. [SugarColumn(ColumnDescription = "创建者部门Id", IsOnlyIgnoreUpdate = true, IsNullable = true)]
  72. public virtual long CreateOrgId { get; set; }
  73. }