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

RoleInput.cs 2.5 KiB

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