brand.go 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. package v1
  2. import (
  3. "adm-gateway/param/base"
  4. v1 "adm-gateway/pb/v1"
  5. )
  6. type GetBrandListQuery struct {
  7. BrandName string `form:"brand_name" json:"brand_name"`
  8. BrandId string `form:"brand_id" json:"brand_id"`
  9. Initial string `form:"initial" json:"initial"`
  10. HasImg int32 `form:"has_img" json:"has_img"`
  11. Status int32 `form:"status" json:"status"`
  12. Page int32 `form:"page" json:"page"`
  13. PageSize int32 `form:"page_size" json:"page_size"`
  14. OldBrandName string `form:"old_brand_name" json:"old_brand_name"`
  15. }
  16. type GetBrandListRequest struct {
  17. base.Header
  18. GetBrandListQuery
  19. }
  20. type GetBrandListResponse struct {
  21. base.Result
  22. Data *v1.BrandListReply `json:"data"`
  23. }
  24. type SearchQuery struct {
  25. Type int32 `json:"type" form:"type"`
  26. Search string `json:"search" form:"search"`
  27. BrandId string `json:"brand_id" form:"brand_id"`
  28. MakerId string `json:"maker_id" form:"maker_id"`
  29. SeriesId string `json:"series_id" form:"series_id"`
  30. }
  31. type SearchRequest struct {
  32. base.Header
  33. SearchQuery
  34. }
  35. type SearchResponse struct {
  36. base.Result
  37. Data *v1.SearchReply `json:"data"`
  38. }
  39. type UpdateBrandBody struct {
  40. ID int64 `form:"id" json:"id"`
  41. BrandName string `form:"brand_name" json:"brand_name"`
  42. Initial string `form:"initial" json:"initial"`
  43. Weight int64 `form:"weight" json:"weight"`
  44. Status int64 `form:"status" json:"status"`
  45. HasImg int64 `form:"has_img" json:"has_img"`
  46. OldBrandName string `form:"old_brand_name" json:"old_brand_name"`
  47. }
  48. type UpdateBrandRequest struct {
  49. base.Header
  50. UpdateBrandBody
  51. }
  52. type UpdateBrandResponse struct {
  53. base.Result
  54. }
  55. type GetMakerQuery struct {
  56. BrandId string `json:"brand_id" form:"brand_id"`
  57. }
  58. type GetMakerRequest struct {
  59. base.Header
  60. GetMakerQuery
  61. }
  62. type GetMakerResponse struct {
  63. base.Result
  64. Data []*v1.MakerList `json:"data"`
  65. }
  66. type UpdateMakerBody struct {
  67. MakerId string `json:"maker_id" form:"maker_id"`
  68. Maker string `json:"maker" form:"maker"`
  69. }
  70. type UpdateMakerRequest struct {
  71. base.Header
  72. UpdateMakerBody
  73. }
  74. type UpdateMakerResponse struct {
  75. base.Result
  76. }