平安校园
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.
 
 
 
 
 
 

131 lines
2.5 KiB

  1. //
  2. namespace SafeCampus.System;
  3. /// <summary>
  4. /// 角色查询参数
  5. /// </summary>
  6. public class RolePageInput : PositionPageInput
  7. {
  8. }
  9. /// <summary>
  10. /// 角色添加参数
  11. /// </summary>
  12. public class RoleAddInput : SysRole
  13. {
  14. /// <summary>
  15. /// 名称
  16. /// </summary>
  17. [Required(ErrorMessage = "Name不能为空")]
  18. public override string Name { get; set; }
  19. }
  20. /// <summary>
  21. /// 角色编辑参数
  22. /// </summary>
  23. public class RoleEditInput : RoleAddInput
  24. {
  25. /// <summary>
  26. /// Id
  27. /// </summary>
  28. [IdNotNull(ErrorMessage = "Id不能为空")]
  29. public override long Id { get; set; }
  30. }
  31. /// <summary>
  32. /// 角色授权资源参数
  33. /// </summary>
  34. public class GrantResourceInput : RoleOwnResourceOutput
  35. {
  36. /// <summary>
  37. /// 角色Id
  38. /// </summary>
  39. [IdNotNull(ErrorMessage = "Id不能为空")]
  40. public override long Id { get; set; }
  41. /// <summary>
  42. /// 授权资源信息
  43. /// </summary>
  44. [Required(ErrorMessage = "GrantInfoList不能为空")]
  45. public override List<RelationRoleResource> GrantInfoList { get; set; }
  46. /// <summary>
  47. /// 是否代码生成
  48. /// </summary>
  49. public bool IsCodeGen { get; set; }
  50. }
  51. /// <summary>
  52. /// 角色授权资源参数
  53. /// </summary>
  54. public class GrantPermissionInput : RoleOwnPermissionOutput
  55. {
  56. /// <summary>
  57. /// 角色Id
  58. /// </summary>
  59. [IdNotNull(ErrorMessage = "Id不能为空")]
  60. public override long Id { get; set; }
  61. /// <summary>
  62. /// 授权权限信息
  63. /// </summary>
  64. [Required(ErrorMessage = "GrantInfoList不能为空")]
  65. public override List<RelationRolePermission> GrantInfoList { get; set; }
  66. }
  67. /// <summary>
  68. /// 角色授权用户参数
  69. /// </summary>
  70. public class GrantUserInput
  71. {
  72. /// <summary>
  73. /// Id
  74. /// </summary>
  75. [IdNotNull(ErrorMessage = "Id不能为空")]
  76. public long Id { get; set; }
  77. /// <summary>
  78. /// 授权权限信息
  79. /// </summary>
  80. [Required(ErrorMessage = "GrantInfoList不能为空")]
  81. public List<long> GrantInfoList { get; set; }
  82. }
  83. /// <summary>
  84. /// 角色选择器参数
  85. /// </summary>
  86. public class RoleSelectorInput : BasePageInput
  87. {
  88. /// <summary>
  89. /// 组织ID
  90. /// </summary>
  91. public long OrgId { get; set; }
  92. /// <summary>
  93. /// 机构ID列表
  94. /// </summary>
  95. public List<long> OrgIds { get; set; }
  96. /// <summary>
  97. /// 角色名称
  98. /// </summary>
  99. public string Name { get; set; }
  100. }
  101. public class RoleTreeInput
  102. {
  103. /// <summary>
  104. /// 机构ID列表
  105. /// </summary>
  106. public List<long> OrgIds { get; set; }
  107. }