request_params.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package user
  2. import (
  3. "git.sxidc.com/go-framework/baize/framework/core/api/request"
  4. )
  5. type (
  6. CreateUserJsonBody struct {
  7. UserName string `json:"userName" binding:"required" assign:"toField:UserName"`
  8. Password string `json:"password" binding:"required" assign:"toField:Password"`
  9. Name string `json:"name" assign:"toField:Name"`
  10. Phone string `json:"phone" assign:"toField:Phone"`
  11. Email string `json:"email" assign:"toField:Email"`
  12. }
  13. DeleteUserQueryParams struct {
  14. request.IDQueryParam
  15. }
  16. UpdateUserJsonBody struct {
  17. request.IDJsonBody
  18. Password string `json:"password" assign:"toField:Password"`
  19. Name string `json:"name" assign:"toField:Name"`
  20. Phone string `json:"phone" assign:"toField:Phone"`
  21. Email string `json:"email" assign:"toField:Email"`
  22. }
  23. GetUsersQueryParams struct {
  24. request.BaseQueryParams
  25. UserName string `form:"userName" assign:"toField:UserName"`
  26. Name string `form:"name" assign:"toField:Name"`
  27. Phone string `form:"phone" assign:"toField:Phone"`
  28. Email string `form:"email" assign:"toField:Email"`
  29. }
  30. GetUserQueryParams struct {
  31. request.IDQueryParam
  32. }
  33. UpdateRolesOfUserJsonBody struct {
  34. request.IDJsonBody
  35. RoleIDs []string `json:"roleIds" assign:"toField:RoleIDs"`
  36. }
  37. GetRolesOfUserQueryParams struct {
  38. request.BaseQueryWithIDParams
  39. }
  40. )