request_params.go 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package role
  2. import "git.sxidc.com/go-framework/baize/framework/core/api/request"
  3. type (
  4. CreateRoleJsonBody struct {
  5. Name string `json:"name" binding:"required" assign:"toField:Name"`
  6. Description string `json:"description" assign:"toField:Description"`
  7. }
  8. DeleteRoleQueryParams struct {
  9. request.IDQueryParam
  10. }
  11. UpdateRoleJsonBody struct {
  12. request.IDJsonBody
  13. Name string `json:"name" assign:"toField:Name"`
  14. Description string `json:"description" assign:"toField:Description"`
  15. }
  16. GetRolesQueryParams struct {
  17. request.BaseQueryParams
  18. Name string `form:"name" assign:"toField:Name"`
  19. Description string `form:"description" assign:"toField:Description"`
  20. }
  21. GetRoleQueryParams struct {
  22. request.IDQueryParam
  23. }
  24. UpdateUsersOfRoleJsonBody struct {
  25. request.IDJsonBody
  26. UserIDs []string `json:"userIds" assign:"toField:UserIDs"`
  27. }
  28. GetUsersOfRoleQueryParams struct {
  29. request.BaseQueryWithIDParams
  30. }
  31. UpdatePermissionsOfRoleJsonBody struct {
  32. request.IDJsonBody
  33. PermissionIDs []string `json:"permissionIds" assign:"toField:PermissionIDs"`
  34. }
  35. GetPermissionsOfRoleQueryParams struct {
  36. request.BaseQueryWithIDParams
  37. }
  38. )