平安校园
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

84 linhas
2.1 KiB

  1. //
  2. namespace SafeCampus.System;
  3. /// <summary>
  4. /// 角色
  5. ///</summary>
  6. [SugarTable("sys_role", TableDescription = "角色")]
  7. [Tenant(SqlSugarConst.DB_DEFAULT)]
  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. }