using SqlSugar; using Volo.Abp; using Volo.Abp.Auditing; using Volo.Abp.Domain.Entities; using Yi.Framework.Core.Data; namespace Yi.Framework.Rbac.Domain.Entities { /// /// 部门表 /// [SugarTable("Dept")] public class DeptEntity : Entity, ISoftDelete, IAuditedObject, IOrderNum, IState { public DeptEntity() { } public DeptEntity(Guid Id) { this.Id = Id; ParentId = Guid.Empty; } public DeptEntity(Guid Id, Guid parentId) { this.Id = Id; ParentId = parentId; } /// /// 主键 /// [SugarColumn(IsPrimaryKey = true)] public override Guid Id { get; protected set; } /// /// 逻辑删除 /// public bool IsDeleted { get; set; } /// /// 创建时间 /// public DateTime CreationTime { get; set; } = DateTime.Now; /// /// 创建者 /// public Guid? CreatorId { get; set; } /// /// 最后修改者 /// public Guid? LastModifierId { get; set; } /// /// 最后修改时间 /// public DateTime? LastModificationTime { get; set; } /// /// 排序 /// public int OrderNum { get; set; } = 0; /// /// 状态 /// public bool State { get; set; } = true; /// /// 部门名称 /// public string DeptName { get; set; } = string.Empty; /// /// 部门编码 /// [SugarColumn(ColumnName = "DeptCode")] public string DeptCode { get; set; } = string.Empty; /// /// 负责人 /// [SugarColumn(ColumnName = "Leader")] public string? Leader { get; set; } /// /// 父级id /// [SugarColumn(ColumnName = "ParentId")] public Guid ParentId { get; set; } /// /// 描述 /// [SugarColumn(ColumnName = "Remark")] public string? Remark { get; set; } } }