request_params.go 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package permission
  2. import "git.sxidc.com/go-framework/baize/framework/core/api/request"
  3. type (
  4. CreatePermissionJsonBody struct {
  5. Name string `json:"name" binding:"required" assign:"toField:Name"`
  6. Description string `json:"description" assign:"toField:Description"`
  7. Resource string `json:"resource" binding:"required" assign:"toField:Resource"`
  8. Action string `json:"action" binding:"required" assign:"toField:Action"`
  9. }
  10. DeletePermissionQueryParams struct {
  11. request.IDQueryParam
  12. }
  13. UpdatePermissionJsonBody struct {
  14. request.IDJsonBody
  15. Name string `json:"name" assign:"toField:Name"`
  16. Description string `json:"description" assign:"toField:Description"`
  17. Resource string `json:"resource" assign:"toField:Resource"`
  18. Action string `json:"action" assign:"toField:Action"`
  19. }
  20. GetPermissionsQueryParams struct {
  21. request.BaseQueryParams
  22. Name string `form:"name" assign:"toField:Name"`
  23. Resource string `form:"resource" assign:"toField:Resource"`
  24. Action string `form:"action" assign:"toField:Action"`
  25. }
  26. GetPermissionQueryParams struct {
  27. request.IDQueryParam
  28. }
  29. UpdatePermissionGroupsOfPermissionJsonBody struct {
  30. request.IDJsonBody
  31. PermissionGroupIDs []string `json:"permissionGroupIds" assign:"toField:PermissionGroupIDs"`
  32. }
  33. GetPermissionGroupsOfPermissionQueryParams struct {
  34. request.BaseQueryWithIDParams
  35. }
  36. UpdateRolesOfPermissionJsonBody struct {
  37. request.IDJsonBody
  38. RoleIDs []string `json:"roleIds" assign:"toField:RoleIDs"`
  39. }
  40. GetRolesOfPermissionQueryParams struct {
  41. request.BaseQueryWithIDParams
  42. }
  43. )