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