|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
-
- //
-
-
-
-
-
-
-
-
- namespace SafeCampus.SqlSugar;
-
- /// <summary>
- /// 主键实体基类
- /// </summary>
- public abstract class PrimaryKeyEntity
- {
- /// <summary>
- /// 主键Id
- /// </summary>
- [SugarColumn(ColumnDescription = "Id", IsPrimaryKey = true)]
- public virtual long Id { get; set; }
-
- /// <summary>
- /// 拓展信息
- /// </summary>
- [SugarColumn(ColumnName = "ExtJson", ColumnDescription = "扩展信息", ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = true)]
- public virtual string ExtJson { get; set; }
- }
-
- /// <summary>
- /// 框架实体基类
- /// </summary>
- public class BaseEntity : PrimaryKeyEntity
- {
- [SugarColumn(ColumnName = "Status", ColumnDescription = "状态", Length = 20, DefaultValue = CommonStatusConst.ENABLE,
- IsNullable = true)]
- public virtual string Status { get; set; }
-
- /// <summary>
- /// 创建时间
- /// </summary>
- [SugarColumn(ColumnDescription = "创建时间", IsOnlyIgnoreUpdate = true, IsNullable = true)]
- public virtual DateTime? CreateTime { get; set; }
-
- /// <summary>
- /// 更新时间
- /// </summary>
- [SugarColumn(ColumnDescription = "更新时间", IsOnlyIgnoreInsert = true, IsNullable = true)]
- public virtual DateTime? UpdateTime { get; set; }
-
- /// <summary>
- /// 创建者Id
- /// </summary>
- [SugarColumn(ColumnDescription = "创建者Id", IsOnlyIgnoreUpdate = true, IsNullable = true)]
- public virtual long? CreateUserId { get; set; }
-
- /// <summary>
- /// 修改者Id
- /// </summary>
- [SugarColumn(ColumnDescription = "修改者Id", IsOnlyIgnoreInsert = true, IsNullable = true)]
- public virtual long? UpdateUserId { get; set; }
-
- /// <summary>
- /// 创建人
- /// </summary>
- [SugarColumn(ColumnDescription = "创建人", IsOnlyIgnoreUpdate = true, IsNullable = true)]
- public virtual string CreateUser { get; set; }
-
- /// <summary>
- /// 更新人
- /// </summary>
- [SugarColumn(ColumnDescription = "更新人", IsOnlyIgnoreInsert = true, IsNullable = true)]
- public virtual string UpdateUser { get; set; }
-
- /// <summary>
- /// 软删除
- /// </summary>
- [SugarColumn(ColumnDescription = "软删除", IsNullable = true)]
- public virtual bool IsDelete { get; set; }
- }
-
- /// <summary>
- /// 业务数据实体基类(数据权限)
- /// </summary>
- public abstract class DataEntityBase : BaseEntity
- {
- /// <summary>
- /// 创建者部门Id
- /// </summary>
- [SugarColumn(ColumnDescription = "创建者部门Id", IsOnlyIgnoreUpdate = true, IsNullable = true)]
- public virtual long CreateOrgId { get; set; }
- }
|