namespace SafeCampus.System; /// /// 角色 /// [SugarTable("sys_role", TableDescription = "角色")] [Tenant(SqlSugarConst.DB_DEFAULT)] [IgnoreInitTable] public class SysRole : DataEntityBase { /// /// 组织id /// [SugarColumn(ColumnName = "OrgId", ColumnDescription = "组织id", IsNullable = true)] public long? OrgId { get; set; } /// /// 名称 /// [SugarColumn(ColumnName = "Name", ColumnDescription = "名称", Length = 200, IsNullable = false)] public virtual string Name { get; set; } /// /// 编码 /// [SugarColumn(ColumnName = "Code", ColumnDescription = "编码", Length = 200, IsNullable = false)] public string Code { get; set; } /// /// 分类 /// [SugarColumn(ColumnName = "Category", ColumnDescription = "分类", Length = 200, IsNullable = false)] public virtual string Category { get; set; } /// /// 默认数据范围 /// [SugarColumn(ColumnName = "DefaultDataScope", ColumnDescription = "默认数据范围", IsJson = true, ColumnDataType = StaticConfig.CodeFirst_BigString, IsNullable = false)] public virtual DefaultDataScope DefaultDataScope { get; set; } /// /// 排序码 /// [SugarColumn(ColumnName = "SortCode", ColumnDescription = "排序码", IsNullable = true)] public int? SortCode { get; set; } /// /// 用户列表 /// [SugarColumn(IsIgnore = true)] public List UserList { get; set; } = new List(); } /// /// 默认数据范围 /// public class DefaultDataScope { /// /// 数据范围等级 /// public int Level { get; set; } /// /// 数据范围 /// public string ScopeCategory { get; set; } /// /// 自定义机构范围列表 /// public List ScopeDefineOrgIdList { get; set; } = new List(); }