using SqlSugar; using System; namespace Tiobon.Core.Model.Models { /// /// 角色表 /// public class Role : RootEntityTkey { public Role() { OrderSort = 1; CreateTime = DateTime.Now; ModifyTime = DateTime.Now; IsDeleted = false; } public Role(string name) { Name = name; Description = ""; OrderSort = 1; Enabled = true; CreateTime = DateTime.Now; ModifyTime = DateTime.Now; } /// ///获取或设置是否禁用,逻辑上的删除,非物理删除 /// [SugarColumn(IsNullable = true)] public bool? IsDeleted { get; set; } /// /// 角色名 /// [SugarColumn(Length = 50, IsNullable = true)] public string Name { get; set; } /// ///描述 /// [SugarColumn(Length = 100, IsNullable = true)] public string Description { get; set; } /// ///排序 /// public int OrderSort { get; set; } /// /// 自定义权限的部门ids /// [SugarColumn(Length = 500, IsNullable = true)] public string Dids { get; set; } /// /// 权限范围 /// -1 无任何权限;1 自定义权限;2 本部门;3 本部门及以下;4 仅自己;9 全部; /// [SugarColumn(IsNullable = true)] public int AuthorityScope { get; set; } = -1; /// /// 是否激活 /// public bool Enabled { get; set; } /// /// 创建ID /// [SugarColumn(IsNullable = true)] public long? CreateId { get; set; } /// /// 创建者 /// [SugarColumn(Length = 50, IsNullable = true)] public string CreateBy { get; set; } /// /// 创建时间 /// [SugarColumn(IsNullable = true)] public DateTime? CreateTime { get; set; } = DateTime.Now; /// /// 修改ID /// [SugarColumn(IsNullable = true)] public long? ModifyId { get; set; } /// /// 修改者 /// [SugarColumn(IsNullable = true)] public string ModifyBy { get; set; } /// /// 修改时间 /// [SugarColumn(IsNullable = true)] public DateTime? ModifyTime { get; set; } = DateTime.Now; } }