swagger.yaml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. definitions:
  2. http_model.CommonResponse:
  3. properties:
  4. data: {}
  5. message:
  6. type: string
  7. status:
  8. type: integer
  9. type: object
  10. http_model.CreateProductData:
  11. properties:
  12. product_id:
  13. description: 商品id
  14. type: integer
  15. type: object
  16. http_model.CreateProductPhoto:
  17. properties:
  18. photo_uid:
  19. type: string
  20. photo_url:
  21. description: 图片或视频url
  22. type: string
  23. symbol:
  24. description: 图片为主图或详情图标志位,1为主图,2为详情图,3为视频
  25. type: integer
  26. type: object
  27. http_model.CreateProductRequest:
  28. properties:
  29. brand_name:
  30. type: string
  31. product_detail:
  32. type: string
  33. product_id:
  34. type: integer
  35. product_name:
  36. description: 商品名称
  37. type: string
  38. product_photos:
  39. description: 商品图片列表
  40. items:
  41. $ref: '#/definitions/http_model.CreateProductPhoto'
  42. type: array
  43. product_price:
  44. description: 商品价值
  45. type: integer
  46. product_type:
  47. description: 商品类型
  48. type: integer
  49. product_url:
  50. description: 商品链接,可为电商网址、公司官网、大众点评的店铺地址等可以说明商品信息或者品牌信息的线上地址;
  51. type: string
  52. shop_address:
  53. description: 店铺地址,商品类型为线下品牌时需填写
  54. type: string
  55. type: object
  56. http_model.FullProjectListData:
  57. properties:
  58. full_project_pre_view:
  59. items:
  60. $ref: '#/definitions/http_model.FullProjectPreview'
  61. type: array
  62. total:
  63. type: string
  64. type: object
  65. http_model.FullProjectListRequest:
  66. properties:
  67. page_num:
  68. type: integer
  69. page_size:
  70. type: integer
  71. project_content_type:
  72. description: 内容形式
  73. type: string
  74. project_fee_forms:
  75. description: 稿费形式
  76. type: string
  77. project_form:
  78. description: 项目形式
  79. type: string
  80. project_platform:
  81. description: 项目平台
  82. type: string
  83. project_status:
  84. description: 项目状态
  85. type: string
  86. project_updated:
  87. description: 最后操作时间
  88. type: string
  89. type: object
  90. http_model.FullProjectPreview:
  91. properties:
  92. project_content_type:
  93. description: 内容形式
  94. type: string
  95. project_fee_forms:
  96. description: 稿费形式
  97. items:
  98. type: string
  99. type: array
  100. project_form:
  101. description: 项目形式
  102. type: string
  103. project_id:
  104. description: 项目ID
  105. type: string
  106. project_name:
  107. description: 项目名
  108. type: string
  109. project_platform:
  110. description: 项目平台
  111. type: string
  112. project_status:
  113. description: 项目状态
  114. type: string
  115. project_updated:
  116. description: 最后操作时间
  117. type: string
  118. type: object
  119. http_model.SendCodeData:
  120. type: object
  121. http_model.SendCodeRequest:
  122. properties:
  123. phone:
  124. type: string
  125. type: object
  126. info:
  127. contact: {}
  128. paths:
  129. /product/create:
  130. post:
  131. consumes:
  132. - application/json
  133. description: 企业创建商品,添加到商品库
  134. parameters:
  135. - description: 登录TOKEN信息
  136. in: header
  137. name: Authorization
  138. required: true
  139. type: string
  140. - description: 创建商品请求结构体
  141. in: body
  142. name: req
  143. required: true
  144. schema:
  145. $ref: '#/definitions/http_model.CreateProductRequest'
  146. produces:
  147. - application/json
  148. responses:
  149. "200":
  150. description: 创建商品相应结构体
  151. schema:
  152. allOf:
  153. - $ref: '#/definitions/http_model.CommonResponse'
  154. - properties:
  155. data:
  156. $ref: '#/definitions/http_model.CreateProductData'
  157. type: object
  158. summary: CreateProduct 创建商品
  159. /product/list:
  160. get:
  161. consumes:
  162. - application/json
  163. description: 展示企业的商品列表
  164. parameters:
  165. - description: 登录TOKEN信息
  166. in: header
  167. name: Authorization
  168. required: true
  169. type: string
  170. - description: 创建全部商品请求结构体
  171. in: body
  172. name: req
  173. required: true
  174. schema:
  175. $ref: '#/definitions/http_model.FullProjectListRequest'
  176. produces:
  177. - application/json
  178. responses:
  179. "200":
  180. description: 创建全部商品列表相应结构体
  181. schema:
  182. allOf:
  183. - $ref: '#/definitions/http_model.CommonResponse'
  184. - properties:
  185. data:
  186. $ref: '#/definitions/http_model.FullProjectListData'
  187. type: object
  188. summary: ProjectList 商品列表
  189. /sendCode:
  190. post:
  191. consumes:
  192. - application/json
  193. description: 发送验证码,每次发送到邮箱
  194. parameters:
  195. - description: 发送验证码请求参数结构体
  196. in: body
  197. name: req
  198. required: true
  199. schema:
  200. $ref: '#/definitions/http_model.SendCodeRequest'
  201. produces:
  202. - application/json
  203. responses:
  204. "200":
  205. description: 发送验证码请求相应结构体
  206. schema:
  207. allOf:
  208. - $ref: '#/definitions/http_model.CommonResponse'
  209. - properties:
  210. data:
  211. $ref: '#/definitions/http_model.SendCodeData'
  212. type: object
  213. summary: sendCode 发送验证码
  214. swagger: "2.0"