namespace Admin.NET.Core;
///
/// 框架实体基类Id
///
public abstract class EntityBaseId
{
///
/// 雪花Id
///
[SugarColumn(ColumnDescription = "Id", IsPrimaryKey = true, IsIdentity = false)]
public virtual long Id { get; set; }
}
///
/// 框架实体基类
///
public abstract class EntityBase : EntityBaseId, IDeletedFilter
{
///
/// 创建时间
///
[SugarColumn(ColumnDescription = "创建时间", IsOnlyIgnoreUpdate = true)]
public virtual DateTime? CreateTime { get; set; }
///
/// 更新时间
///
[SugarColumn(ColumnDescription = "更新时间", IsOnlyIgnoreInsert = true)]
public virtual DateTime? UpdateTime { get; set; }
///
/// 创建者Id
///
[SugarColumn(ColumnDescription = "创建者Id", IsOnlyIgnoreUpdate = true)]
public virtual long? CreateUserId { get; set; }
///
/// 修改者Id
///
[SugarColumn(ColumnDescription = "修改者Id", IsOnlyIgnoreInsert = true)]
public virtual long? UpdateUserId { get; set; }
///
/// 软删除
///
[SugarColumn(ColumnDescription = "软删除")]
public virtual bool IsDelete { get; set; } = false;
}
///
/// 业务数据实体基类(数据权限)
///
public abstract class EntityBaseData : EntityBase, IOrgIdFilter
{
///
/// 创建者部门Id
///
[SugarColumn(ColumnDescription = "创建者部门Id", IsOnlyIgnoreUpdate = true)]
public virtual long? CreateOrgId { get; set; }
}
///
/// 租户基类实体
///
public abstract class EntityTenant : EntityBase, ITenantIdFilter
{
///
/// 租户Id
///
[SugarColumn(ColumnDescription = "租户Id", IsOnlyIgnoreUpdate = true)]
public virtual long? TenantId { get; set; }
}
///
/// 租户基类实体Id
///
public abstract class EntityTenantId : EntityBaseId, ITenantIdFilter
{
///
/// 租户Id
///
[SugarColumn(ColumnDescription = "租户Id", IsOnlyIgnoreUpdate = true)]
public virtual long? TenantId { get; set; }
}