origanaization.go 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. package v1
  2. import (
  3. "cp-system-management-gateway/param/base"
  4. "cp-system-management-gateway/pb/v1"
  5. )
  6. type CreateOrganizationBody struct {
  7. OrganizationName string `form:"organization_name" json:"organization_name"`
  8. Month int64 `form:"month"`
  9. IsDisable bool `form:"is_disable" json:"is_disable"`
  10. }
  11. type CreateOrganizationRequest struct {
  12. base.Header
  13. CreateOrganizationBody
  14. }
  15. type CreateOrganizationData struct {
  16. OrganizationCode string `json:"organization_code"`
  17. }
  18. type CreateOrganizationResponse struct {
  19. base.Result
  20. Data CreateOrganizationData `json:"data"`
  21. }
  22. type UpdateOrganizationBody struct {
  23. OrganizationName string `form:"organization_name" json:"organization_name"`
  24. OrganizationCode string `form:"organization_code" json:"organization_code"`
  25. IsDisable bool `form:"is_disable" json:"is_disable"`
  26. Month int64 `form:"month" json:"month"`
  27. }
  28. type UpdateOrganizationRequest struct {
  29. base.Header
  30. UpdateOrganizationBody
  31. }
  32. type UpdateOrganizationResponse struct {
  33. base.Result
  34. }
  35. type OrganizationListQuery struct {
  36. Page int64 `form:"page"`
  37. PageSize int64 `form:"page_size" json:"page_size"`
  38. Filter string `form:"filter"`
  39. }
  40. type OrganizationListRequest struct {
  41. base.Header
  42. OrganizationListQuery
  43. }
  44. type OrganizationListResponse struct {
  45. base.Result
  46. Data v1.OrganizationListReply `json:"data"`
  47. }
  48. type CreateOrganizationUserBody struct {
  49. OrganizationCode string `form:"organization_code" json:"organization_code"`
  50. Username string `form:"username" json:"username"`
  51. Password string `form:"password" json:"password"`
  52. Phone string `form:"phone" json:"phone"`
  53. Email string `form:"email" json:"email"`
  54. }
  55. type CreateOrganizationUserRequest struct {
  56. base.Header
  57. CreateOrganizationUserBody
  58. }
  59. type CreateOrganizationUserResponse struct {
  60. base.Result
  61. Data v1.CreateOrganizationUserReply `json:"data"`
  62. }
  63. type OrganizationUserListQuery struct {
  64. Page int64 `form:"page"`
  65. PageSize int64 `form:"page_size" json:"page_size"`
  66. OrganizationCode string `form:"organization_code" json:"organization_code"`
  67. }
  68. type OrganizationUserListRequest struct {
  69. base.Header
  70. OrganizationUserListQuery
  71. }
  72. type OrganizationUserListResponse struct {
  73. base.Result
  74. Data v1.OrganizationUserListReply `json:"data"`
  75. }
  76. type OrganizationUserUpdateBody struct {
  77. OrganizationCode string `form:"organization_code" json:"organization_code"`
  78. Username string `form:"username" json:"username"`
  79. Phone string `form:"phone" json:"phone"`
  80. Email string `form:"email" json:"email"`
  81. Id int64 `form:"id" json:"id"`
  82. Password string `form:"password" json:"password"`
  83. }
  84. type OrganizationUserUpdateRequest struct {
  85. base.Header
  86. OrganizationUserUpdateBody
  87. }
  88. type OrganizationUserUpdateResponse struct {
  89. base.Result
  90. }
  91. type OrganizationUserResetPasswordBody struct {
  92. OrganizationCode string `form:"organization_code" json:"organization_code"`
  93. Id int64 `form:"id" json:"id"`
  94. Password string `form:"password" json:"password"`
  95. }
  96. type OrganizationUserResetPasswordRequest struct {
  97. base.Header
  98. OrganizationUserResetPasswordBody
  99. }
  100. type OrganizationUserResetPasswordResponse struct {
  101. base.Result
  102. }