平安校园
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SysRole.cs 2.1 KiB

3 months ago
3 months ago
3 months ago
3 months ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. namespace SafeCampus.System;
  2. /// <summary>
  3. /// 角色
  4. ///</summary>
  5. [SugarTable("sys_role", TableDescription = "角色")]
  6. [Tenant(SqlSugarConst.DB_DEFAULT)]
  7. [IgnoreInitTable]
  8. public class SysRole : DataEntityBase
  9. {
  10. /// <summary>
  11. /// 组织id
  12. ///</summary>
  13. [SugarColumn(ColumnName = "OrgId", ColumnDescription = "组织id", IsNullable = true)]
  14. public long? OrgId { get; set; }
  15. /// <summary>
  16. /// 名称
  17. ///</summary>
  18. [SugarColumn(ColumnName = "Name", ColumnDescription = "名称", Length = 200, IsNullable = false)]
  19. public virtual string Name { get; set; }
  20. /// <summary>
  21. /// 编码
  22. ///</summary>
  23. [SugarColumn(ColumnName = "Code", ColumnDescription = "编码", Length = 200, IsNullable = false)]
  24. public string Code { get; set; }
  25. /// <summary>
  26. /// 分类
  27. ///</summary>
  28. [SugarColumn(ColumnName = "Category", ColumnDescription = "分类", Length = 200, IsNullable = false)]
  29. public virtual string Category { get; set; }
  30. /// <summary>
  31. /// 默认数据范围
  32. ///</summary>
  33. [SugarColumn(ColumnName = "DefaultDataScope", ColumnDescription = "默认数据范围", IsJson = true, ColumnDataType = StaticConfig.CodeFirst_BigString,
  34. IsNullable = false)]
  35. public virtual DefaultDataScope DefaultDataScope { get; set; }
  36. /// <summary>
  37. /// 排序码
  38. ///</summary>
  39. [SugarColumn(ColumnName = "SortCode", ColumnDescription = "排序码", IsNullable = true)]
  40. public int? SortCode { get; set; }
  41. /// <summary>
  42. /// 用户列表
  43. /// </summary>
  44. [SugarColumn(IsIgnore = true)]
  45. public List<UserSelectorOutPut> UserList { get; set; } = new List<UserSelectorOutPut>();
  46. }
  47. /// <summary>
  48. /// 默认数据范围
  49. /// </summary>
  50. public class DefaultDataScope
  51. {
  52. /// <summary>
  53. /// 数据范围等级
  54. /// </summary>
  55. public int Level { get; set; }
  56. /// <summary>
  57. /// 数据范围
  58. /// </summary>
  59. public string ScopeCategory { get; set; }
  60. /// <summary>
  61. /// 自定义机构范围列表
  62. /// </summary>
  63. public List<long> ScopeDefineOrgIdList { get; set; } = new List<long>();
  64. }