swagger.json 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "contact": {}
  5. },
  6. "paths": {
  7. "/product/create": {
  8. "post": {
  9. "description": "企业创建商品,添加到商品库",
  10. "consumes": [
  11. "application/json"
  12. ],
  13. "produces": [
  14. "application/json"
  15. ],
  16. "summary": "CreateProduct 创建商品",
  17. "parameters": [
  18. {
  19. "type": "string",
  20. "description": "登录TOKEN信息",
  21. "name": "Authorization",
  22. "in": "header",
  23. "required": true
  24. },
  25. {
  26. "description": "创建商品请求结构体",
  27. "name": "req",
  28. "in": "body",
  29. "required": true,
  30. "schema": {
  31. "$ref": "#/definitions/http_model.CreateProductRequest"
  32. }
  33. }
  34. ],
  35. "responses": {
  36. "200": {
  37. "description": "创建商品相应结构体",
  38. "schema": {
  39. "allOf": [
  40. {
  41. "$ref": "#/definitions/http_model.CommonResponse"
  42. },
  43. {
  44. "type": "object",
  45. "properties": {
  46. "data": {
  47. "$ref": "#/definitions/http_model.CreateProductData"
  48. }
  49. }
  50. }
  51. ]
  52. }
  53. }
  54. }
  55. }
  56. },
  57. "/product/list": {
  58. "get": {
  59. "description": "展示企业的商品列表",
  60. "consumes": [
  61. "application/json"
  62. ],
  63. "produces": [
  64. "application/json"
  65. ],
  66. "summary": "ProjectList 商品列表",
  67. "parameters": [
  68. {
  69. "type": "string",
  70. "description": "登录TOKEN信息",
  71. "name": "Authorization",
  72. "in": "header",
  73. "required": true
  74. },
  75. {
  76. "description": "创建全部商品请求结构体",
  77. "name": "req",
  78. "in": "body",
  79. "required": true,
  80. "schema": {
  81. "$ref": "#/definitions/http_model.FullProjectListRequest"
  82. }
  83. }
  84. ],
  85. "responses": {
  86. "200": {
  87. "description": "创建全部商品列表相应结构体",
  88. "schema": {
  89. "allOf": [
  90. {
  91. "$ref": "#/definitions/http_model.CommonResponse"
  92. },
  93. {
  94. "type": "object",
  95. "properties": {
  96. "data": {
  97. "$ref": "#/definitions/http_model.FullProjectListData"
  98. }
  99. }
  100. }
  101. ]
  102. }
  103. }
  104. }
  105. }
  106. },
  107. "/sendCode": {
  108. "post": {
  109. "description": "发送验证码,每次发送到邮箱",
  110. "consumes": [
  111. "application/json"
  112. ],
  113. "produces": [
  114. "application/json"
  115. ],
  116. "summary": "sendCode 发送验证码",
  117. "parameters": [
  118. {
  119. "description": "发送验证码请求参数结构体",
  120. "name": "req",
  121. "in": "body",
  122. "required": true,
  123. "schema": {
  124. "$ref": "#/definitions/http_model.SendCodeRequest"
  125. }
  126. }
  127. ],
  128. "responses": {
  129. "200": {
  130. "description": "发送验证码请求相应结构体",
  131. "schema": {
  132. "allOf": [
  133. {
  134. "$ref": "#/definitions/http_model.CommonResponse"
  135. },
  136. {
  137. "type": "object",
  138. "properties": {
  139. "data": {
  140. "$ref": "#/definitions/http_model.SendCodeData"
  141. }
  142. }
  143. }
  144. ]
  145. }
  146. }
  147. }
  148. }
  149. }
  150. },
  151. "definitions": {
  152. "http_model.CommonResponse": {
  153. "type": "object",
  154. "properties": {
  155. "data": {},
  156. "message": {
  157. "type": "string"
  158. },
  159. "status": {
  160. "type": "integer"
  161. }
  162. }
  163. },
  164. "http_model.CreateProductData": {
  165. "type": "object",
  166. "properties": {
  167. "product_id": {
  168. "description": "商品id",
  169. "type": "integer"
  170. }
  171. }
  172. },
  173. "http_model.CreateProductPhoto": {
  174. "type": "object",
  175. "properties": {
  176. "photo_uid": {
  177. "type": "string"
  178. },
  179. "photo_url": {
  180. "description": "图片或视频url",
  181. "type": "string"
  182. },
  183. "symbol": {
  184. "description": "图片为主图或详情图标志位,1为主图,2为详情图,3为视频",
  185. "type": "integer"
  186. }
  187. }
  188. },
  189. "http_model.CreateProductRequest": {
  190. "type": "object",
  191. "properties": {
  192. "brand_name": {
  193. "type": "string"
  194. },
  195. "product_detail": {
  196. "type": "string"
  197. },
  198. "product_id": {
  199. "type": "integer"
  200. },
  201. "product_name": {
  202. "description": "商品名称",
  203. "type": "string"
  204. },
  205. "product_photos": {
  206. "description": "商品图片列表",
  207. "type": "array",
  208. "items": {
  209. "$ref": "#/definitions/http_model.CreateProductPhoto"
  210. }
  211. },
  212. "product_price": {
  213. "description": "商品价值",
  214. "type": "integer"
  215. },
  216. "product_type": {
  217. "description": "商品类型",
  218. "type": "integer"
  219. },
  220. "product_url": {
  221. "description": "商品链接,可为电商网址、公司官网、大众点评的店铺地址等可以说明商品信息或者品牌信息的线上地址;",
  222. "type": "string"
  223. },
  224. "shop_address": {
  225. "description": "店铺地址,商品类型为线下品牌时需填写",
  226. "type": "string"
  227. }
  228. }
  229. },
  230. "http_model.FullProjectListData": {
  231. "type": "object",
  232. "properties": {
  233. "full_project_pre_view": {
  234. "type": "array",
  235. "items": {
  236. "$ref": "#/definitions/http_model.FullProjectPreview"
  237. }
  238. },
  239. "total": {
  240. "type": "string"
  241. }
  242. }
  243. },
  244. "http_model.FullProjectListRequest": {
  245. "type": "object",
  246. "properties": {
  247. "page_num": {
  248. "type": "integer"
  249. },
  250. "page_size": {
  251. "type": "integer"
  252. },
  253. "project_content_type": {
  254. "description": "内容形式",
  255. "type": "string"
  256. },
  257. "project_fee_forms": {
  258. "description": "稿费形式",
  259. "type": "string"
  260. },
  261. "project_form": {
  262. "description": "项目形式",
  263. "type": "string"
  264. },
  265. "project_platform": {
  266. "description": "项目平台",
  267. "type": "string"
  268. },
  269. "project_status": {
  270. "description": "项目状态",
  271. "type": "string"
  272. },
  273. "project_updated": {
  274. "description": "最后操作时间",
  275. "type": "string"
  276. }
  277. }
  278. },
  279. "http_model.FullProjectPreview": {
  280. "type": "object",
  281. "properties": {
  282. "project_content_type": {
  283. "description": "内容形式",
  284. "type": "string"
  285. },
  286. "project_fee_forms": {
  287. "description": "稿费形式",
  288. "type": "array",
  289. "items": {
  290. "type": "string"
  291. }
  292. },
  293. "project_form": {
  294. "description": "项目形式",
  295. "type": "string"
  296. },
  297. "project_id": {
  298. "description": "项目ID",
  299. "type": "string"
  300. },
  301. "project_name": {
  302. "description": "项目名",
  303. "type": "string"
  304. },
  305. "project_platform": {
  306. "description": "项目平台",
  307. "type": "string"
  308. },
  309. "project_status": {
  310. "description": "项目状态",
  311. "type": "string"
  312. },
  313. "project_updated": {
  314. "description": "最后操作时间",
  315. "type": "string"
  316. }
  317. }
  318. },
  319. "http_model.SendCodeData": {
  320. "type": "object"
  321. },
  322. "http_model.SendCodeRequest": {
  323. "type": "object",
  324. "properties": {
  325. "phone": {
  326. "type": "string"
  327. }
  328. }
  329. }
  330. }
  331. }