docs.go 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285
  1. // Code generated by swaggo/swag. DO NOT EDIT.
  2. package docs
  3. import "github.com/swaggo/swag"
  4. const docTemplate = `{
  5. "schemes": {{ marshal .Schemes }},
  6. "swagger": "2.0",
  7. "info": {
  8. "description": "{{escape .Description}}",
  9. "title": "{{.Title}}",
  10. "termsOfService": "http://swagger.io/terms/",
  11. "contact": {},
  12. "license": {
  13. "name": "Apache 2.0",
  14. "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
  15. },
  16. "version": "{{.Version}}"
  17. },
  18. "host": "{{.Host}}",
  19. "basePath": "{{.BasePath}}",
  20. "paths": {
  21. "/appraise/create": {
  22. "post": {
  23. "produces": [
  24. "application/json"
  25. ],
  26. "tags": [
  27. "评论模块"
  28. ],
  29. "summary": "创建评论",
  30. "parameters": [
  31. {
  32. "description": "评价信息",
  33. "name": "json",
  34. "in": "body",
  35. "required": true,
  36. "schema": {
  37. "$ref": "#/definitions/model.AppraiseJson"
  38. }
  39. }
  40. ],
  41. "responses": {
  42. "200": {
  43. "description": "OK",
  44. "schema": {
  45. "$ref": "#/definitions/response.Response"
  46. }
  47. }
  48. }
  49. }
  50. },
  51. "/appraise/delete/{id}": {
  52. "delete": {
  53. "produces": [
  54. "application/json"
  55. ],
  56. "tags": [
  57. "评论模块"
  58. ],
  59. "summary": "删除评论",
  60. "parameters": [
  61. {
  62. "type": "integer",
  63. "description": "评论id",
  64. "name": "id",
  65. "in": "path",
  66. "required": true
  67. }
  68. ],
  69. "responses": {
  70. "200": {
  71. "description": "OK",
  72. "schema": {
  73. "$ref": "#/definitions/response.Response"
  74. }
  75. }
  76. }
  77. }
  78. },
  79. "/appraise/revise": {
  80. "post": {
  81. "produces": [
  82. "application/json"
  83. ],
  84. "tags": [
  85. "评论模块"
  86. ],
  87. "summary": "修改评论",
  88. "parameters": [
  89. {
  90. "description": "评价信息",
  91. "name": "json",
  92. "in": "body",
  93. "required": true,
  94. "schema": {
  95. "$ref": "#/definitions/model.Appraise"
  96. }
  97. }
  98. ],
  99. "responses": {
  100. "200": {
  101. "description": "OK",
  102. "schema": {
  103. "$ref": "#/definitions/response.Response"
  104. }
  105. }
  106. }
  107. }
  108. },
  109. "/appraise/user": {
  110. "get": {
  111. "produces": [
  112. "application/json"
  113. ],
  114. "tags": [
  115. "评论模块"
  116. ],
  117. "summary": "获取用户评价",
  118. "parameters": [
  119. {
  120. "type": "integer",
  121. "description": "用户id",
  122. "name": "id",
  123. "in": "query",
  124. "required": true
  125. }
  126. ],
  127. "responses": {
  128. "200": {
  129. "description": "OK",
  130. "schema": {
  131. "$ref": "#/definitions/response.Response"
  132. }
  133. }
  134. }
  135. }
  136. },
  137. "/category": {
  138. "get": {
  139. "consumes": [
  140. "application/json"
  141. ],
  142. "produces": [
  143. "application/json"
  144. ],
  145. "tags": [
  146. "分类模块"
  147. ],
  148. "summary": "获取所有分类",
  149. "responses": {
  150. "200": {
  151. "description": "OK",
  152. "schema": {
  153. "$ref": "#/definitions/response.Response"
  154. }
  155. }
  156. }
  157. }
  158. },
  159. "/category/create": {
  160. "post": {
  161. "consumes": [
  162. "application/json"
  163. ],
  164. "produces": [
  165. "application/json"
  166. ],
  167. "tags": [
  168. "分类模块"
  169. ],
  170. "summary": "创建分类",
  171. "parameters": [
  172. {
  173. "description": "分类数据",
  174. "name": "json",
  175. "in": "body",
  176. "required": true,
  177. "schema": {
  178. "$ref": "#/definitions/model.CategoryJson"
  179. }
  180. }
  181. ],
  182. "responses": {
  183. "200": {
  184. "description": "OK",
  185. "schema": {
  186. "$ref": "#/definitions/response.Response"
  187. }
  188. }
  189. }
  190. }
  191. },
  192. "/category/delete/{id}": {
  193. "delete": {
  194. "produces": [
  195. "application/json"
  196. ],
  197. "tags": [
  198. "分类模块"
  199. ],
  200. "summary": "根据分类id删除某个分类",
  201. "parameters": [
  202. {
  203. "type": "integer",
  204. "description": "分类id",
  205. "name": "id",
  206. "in": "path",
  207. "required": true
  208. }
  209. ],
  210. "responses": {
  211. "200": {
  212. "description": "OK",
  213. "schema": {
  214. "$ref": "#/definitions/response.Response"
  215. }
  216. }
  217. }
  218. }
  219. },
  220. "/chat": {
  221. "get": {
  222. "tags": [
  223. "聊天模块"
  224. ],
  225. "summary": "与服务端进行websocket连接,请使用postman测试",
  226. "responses": {
  227. "200": {
  228. "description": "OK",
  229. "schema": {
  230. "$ref": "#/definitions/response.Response"
  231. }
  232. }
  233. }
  234. }
  235. },
  236. "/goods/category/{page}/{pageSize}": {
  237. "get": {
  238. "produces": [
  239. "application/json"
  240. ],
  241. "tags": [
  242. "商品模块"
  243. ],
  244. "summary": "按分类查找商品并分页显示",
  245. "parameters": [
  246. {
  247. "type": "integer",
  248. "description": "页数",
  249. "name": "page",
  250. "in": "path",
  251. "required": true
  252. },
  253. {
  254. "type": "integer",
  255. "description": "一页的大小",
  256. "name": "pageSize",
  257. "in": "path",
  258. "required": true
  259. },
  260. {
  261. "type": "integer",
  262. "description": "商品分类id",
  263. "name": "category",
  264. "in": "query",
  265. "required": true
  266. }
  267. ],
  268. "responses": {
  269. "200": {
  270. "description": "OK",
  271. "schema": {
  272. "$ref": "#/definitions/response.Response"
  273. }
  274. }
  275. }
  276. }
  277. },
  278. "/goods/create": {
  279. "post": {
  280. "consumes": [
  281. "application/json"
  282. ],
  283. "produces": [
  284. "application/json"
  285. ],
  286. "tags": [
  287. "商品模块"
  288. ],
  289. "summary": "创建商品",
  290. "parameters": [
  291. {
  292. "description": "商品信息",
  293. "name": "json",
  294. "in": "body",
  295. "required": true,
  296. "schema": {
  297. "$ref": "#/definitions/model.GoodsJson"
  298. }
  299. }
  300. ],
  301. "responses": {
  302. "200": {
  303. "description": "OK",
  304. "schema": {
  305. "$ref": "#/definitions/response.Response"
  306. }
  307. }
  308. }
  309. }
  310. },
  311. "/goods/delete/{id}": {
  312. "delete": {
  313. "produces": [
  314. "application/json"
  315. ],
  316. "tags": [
  317. "商品模块"
  318. ],
  319. "summary": "删除商品",
  320. "parameters": [
  321. {
  322. "type": "integer",
  323. "description": "商品id",
  324. "name": "id",
  325. "in": "path",
  326. "required": true
  327. }
  328. ],
  329. "responses": {
  330. "200": {
  331. "description": "OK",
  332. "schema": {
  333. "$ref": "#/definitions/response.Response"
  334. }
  335. }
  336. }
  337. }
  338. },
  339. "/goods/detail/{id}": {
  340. "get": {
  341. "produces": [
  342. "application/json"
  343. ],
  344. "tags": [
  345. "商品模块"
  346. ],
  347. "summary": "获取商品详细信息",
  348. "parameters": [
  349. {
  350. "type": "integer",
  351. "description": "商品id",
  352. "name": "id",
  353. "in": "path",
  354. "required": true
  355. }
  356. ],
  357. "responses": {
  358. "200": {
  359. "description": "OK",
  360. "schema": {
  361. "$ref": "#/definitions/response.Response"
  362. }
  363. }
  364. }
  365. }
  366. },
  367. "/goods/recommend/{page}/{pageSize}": {
  368. "get": {
  369. "produces": [
  370. "application/json"
  371. ],
  372. "tags": [
  373. "商品模块"
  374. ],
  375. "summary": "分页获取推荐商品",
  376. "parameters": [
  377. {
  378. "type": "integer",
  379. "description": "用户id",
  380. "name": "id",
  381. "in": "query",
  382. "required": true
  383. },
  384. {
  385. "type": "integer",
  386. "description": "页数",
  387. "name": "page",
  388. "in": "path",
  389. "required": true
  390. },
  391. {
  392. "type": "integer",
  393. "description": "一页的大小",
  394. "name": "pageSize",
  395. "in": "path",
  396. "required": true
  397. }
  398. ],
  399. "responses": {
  400. "200": {
  401. "description": "OK",
  402. "schema": {
  403. "$ref": "#/definitions/response.Response"
  404. }
  405. }
  406. }
  407. }
  408. },
  409. "/goods/revise": {
  410. "post": {
  411. "produces": [
  412. "application/json"
  413. ],
  414. "tags": [
  415. "商品模块"
  416. ],
  417. "summary": "修改商品信息",
  418. "parameters": [
  419. {
  420. "description": "商品信息",
  421. "name": "json",
  422. "in": "body",
  423. "required": true,
  424. "schema": {
  425. "$ref": "#/definitions/model.Goods"
  426. }
  427. }
  428. ],
  429. "responses": {
  430. "200": {
  431. "description": "OK",
  432. "schema": {
  433. "$ref": "#/definitions/response.Response"
  434. }
  435. }
  436. }
  437. }
  438. },
  439. "/goods/search/{page}/{pageSize}": {
  440. "get": {
  441. "produces": [
  442. "application/json"
  443. ],
  444. "tags": [
  445. "商品模块"
  446. ],
  447. "summary": "搜索商品并分页显示",
  448. "parameters": [
  449. {
  450. "type": "integer",
  451. "description": "页数",
  452. "name": "page",
  453. "in": "path",
  454. "required": true
  455. },
  456. {
  457. "type": "integer",
  458. "description": "一页的大小",
  459. "name": "pageSize",
  460. "in": "path",
  461. "required": true
  462. },
  463. {
  464. "type": "string",
  465. "description": "搜素关键词",
  466. "name": "keyword",
  467. "in": "query",
  468. "required": true
  469. }
  470. ],
  471. "responses": {
  472. "200": {
  473. "description": "OK",
  474. "schema": {
  475. "$ref": "#/definitions/response.Response"
  476. }
  477. }
  478. }
  479. }
  480. },
  481. "/goods/user/{id}": {
  482. "get": {
  483. "produces": [
  484. "application/json"
  485. ],
  486. "tags": [
  487. "商品模块"
  488. ],
  489. "summary": "获取某个用户的所有商品",
  490. "parameters": [
  491. {
  492. "type": "integer",
  493. "description": "用户id",
  494. "name": "id",
  495. "in": "path",
  496. "required": true
  497. }
  498. ],
  499. "responses": {
  500. "200": {
  501. "description": "OK",
  502. "schema": {
  503. "$ref": "#/definitions/response.Response"
  504. }
  505. }
  506. }
  507. }
  508. },
  509. "/goods/{page}/{pageSize}": {
  510. "get": {
  511. "produces": [
  512. "application/json"
  513. ],
  514. "tags": [
  515. "商品模块"
  516. ],
  517. "summary": "获取所有商品",
  518. "parameters": [
  519. {
  520. "type": "integer",
  521. "description": "页数",
  522. "name": "page",
  523. "in": "path",
  524. "required": true
  525. },
  526. {
  527. "type": "integer",
  528. "description": "一页的大小",
  529. "name": "pageSize",
  530. "in": "path",
  531. "required": true
  532. }
  533. ],
  534. "responses": {
  535. "200": {
  536. "description": "OK",
  537. "schema": {
  538. "$ref": "#/definitions/response.Response"
  539. }
  540. }
  541. }
  542. }
  543. },
  544. "/message": {
  545. "get": {
  546. "produces": [
  547. "application/json"
  548. ],
  549. "tags": [
  550. "信息模块"
  551. ],
  552. "summary": "传入用户id获取用户消息记录",
  553. "parameters": [
  554. {
  555. "type": "integer",
  556. "description": "用户id",
  557. "name": "uid",
  558. "in": "query",
  559. "required": true
  560. }
  561. ],
  562. "responses": {
  563. "200": {
  564. "description": "OK",
  565. "schema": {
  566. "$ref": "#/definitions/response.Response"
  567. }
  568. }
  569. }
  570. }
  571. },
  572. "/message/conv": {
  573. "get": {
  574. "produces": [
  575. "application/json"
  576. ],
  577. "tags": [
  578. "信息模块"
  579. ],
  580. "summary": "传入用户id和聊天对象id获取消息记录",
  581. "parameters": [
  582. {
  583. "type": "integer",
  584. "description": "用户id",
  585. "name": "uid",
  586. "in": "query",
  587. "required": true
  588. },
  589. {
  590. "type": "integer",
  591. "description": "对象id",
  592. "name": "targetId",
  593. "in": "query",
  594. "required": true
  595. }
  596. ],
  597. "responses": {
  598. "200": {
  599. "description": "OK",
  600. "schema": {
  601. "$ref": "#/definitions/response.Response"
  602. }
  603. }
  604. }
  605. }
  606. },
  607. "/order": {
  608. "get": {
  609. "produces": [
  610. "application/json"
  611. ],
  612. "tags": [
  613. "订单模块"
  614. ],
  615. "summary": "获取所有订单",
  616. "responses": {
  617. "200": {
  618. "description": "OK",
  619. "schema": {
  620. "$ref": "#/definitions/response.Response"
  621. }
  622. }
  623. }
  624. }
  625. },
  626. "/order/create": {
  627. "post": {
  628. "produces": [
  629. "application/json"
  630. ],
  631. "tags": [
  632. "订单模块"
  633. ],
  634. "summary": "创建订单",
  635. "parameters": [
  636. {
  637. "description": "订单信息",
  638. "name": "json",
  639. "in": "body",
  640. "required": true,
  641. "schema": {
  642. "$ref": "#/definitions/model.OrderJson"
  643. }
  644. }
  645. ],
  646. "responses": {
  647. "200": {
  648. "description": "OK",
  649. "schema": {
  650. "$ref": "#/definitions/response.Response"
  651. }
  652. }
  653. }
  654. }
  655. },
  656. "/order/delete/{id}": {
  657. "delete": {
  658. "produces": [
  659. "application/json"
  660. ],
  661. "tags": [
  662. "订单模块"
  663. ],
  664. "summary": "删除订单",
  665. "parameters": [
  666. {
  667. "type": "integer",
  668. "description": "订单id",
  669. "name": "id",
  670. "in": "path",
  671. "required": true
  672. }
  673. ],
  674. "responses": {
  675. "200": {
  676. "description": "OK",
  677. "schema": {
  678. "$ref": "#/definitions/response.Response"
  679. }
  680. }
  681. }
  682. }
  683. },
  684. "/order/revise": {
  685. "post": {
  686. "produces": [
  687. "application/json"
  688. ],
  689. "tags": [
  690. "订单模块"
  691. ],
  692. "summary": "修改订单的状态",
  693. "parameters": [
  694. {
  695. "type": "integer",
  696. "description": "订单id",
  697. "name": "id",
  698. "in": "formData",
  699. "required": true
  700. },
  701. {
  702. "type": "integer",
  703. "description": "订单状态",
  704. "name": "state",
  705. "in": "formData",
  706. "required": true
  707. }
  708. ],
  709. "responses": {
  710. "200": {
  711. "description": "OK",
  712. "schema": {
  713. "$ref": "#/definitions/response.Response"
  714. }
  715. }
  716. }
  717. }
  718. },
  719. "/order/user": {
  720. "get": {
  721. "produces": [
  722. "application/json"
  723. ],
  724. "tags": [
  725. "订单模块"
  726. ],
  727. "summary": "获取用户的所有订单",
  728. "parameters": [
  729. {
  730. "type": "integer",
  731. "description": "用户id",
  732. "name": "id",
  733. "in": "query",
  734. "required": true
  735. }
  736. ],
  737. "responses": {
  738. "200": {
  739. "description": "OK",
  740. "schema": {
  741. "$ref": "#/definitions/response.Response"
  742. }
  743. }
  744. }
  745. }
  746. },
  747. "/pic": {
  748. "get": {
  749. "produces": [
  750. "application/json"
  751. ],
  752. "tags": [
  753. "图片模块"
  754. ],
  755. "summary": "获取所有图片",
  756. "responses": {
  757. "200": {
  758. "description": "OK",
  759. "schema": {
  760. "$ref": "#/definitions/response.Response"
  761. }
  762. }
  763. }
  764. }
  765. },
  766. "/pic/delete/{id}": {
  767. "delete": {
  768. "produces": [
  769. "application/json"
  770. ],
  771. "tags": [
  772. "图片模块"
  773. ],
  774. "summary": "删除图片",
  775. "parameters": [
  776. {
  777. "type": "integer",
  778. "description": "图片id",
  779. "name": "id",
  780. "in": "path",
  781. "required": true
  782. }
  783. ],
  784. "responses": {
  785. "200": {
  786. "description": "OK",
  787. "schema": {
  788. "$ref": "#/definitions/response.Response"
  789. }
  790. }
  791. }
  792. }
  793. },
  794. "/pic/upload": {
  795. "post": {
  796. "consumes": [
  797. "multipart/form-data"
  798. ],
  799. "produces": [
  800. "application/json"
  801. ],
  802. "tags": [
  803. "图片模块"
  804. ],
  805. "summary": "上传图片",
  806. "parameters": [
  807. {
  808. "type": "file",
  809. "description": "图片",
  810. "name": "pic",
  811. "in": "formData",
  812. "required": true
  813. }
  814. ],
  815. "responses": {
  816. "200": {
  817. "description": "OK",
  818. "schema": {
  819. "$ref": "#/definitions/response.Response"
  820. }
  821. }
  822. }
  823. }
  824. },
  825. "/relation/bad": {
  826. "get": {
  827. "produces": [
  828. "application/json"
  829. ],
  830. "tags": [
  831. "用户关系模块"
  832. ],
  833. "summary": "传入用户id获取用户黑名单列表",
  834. "parameters": [
  835. {
  836. "type": "integer",
  837. "description": "用户id",
  838. "name": "uid",
  839. "in": "query",
  840. "required": true
  841. }
  842. ],
  843. "responses": {
  844. "200": {
  845. "description": "OK",
  846. "schema": {
  847. "$ref": "#/definitions/response.Response"
  848. }
  849. }
  850. }
  851. }
  852. },
  853. "/relation/create": {
  854. "post": {
  855. "consumes": [
  856. "application/json"
  857. ],
  858. "produces": [
  859. "application/json"
  860. ],
  861. "tags": [
  862. "用户关系模块"
  863. ],
  864. "summary": "添加用户间的关系,关系类型有1:好友关系,2:黑名单关系",
  865. "parameters": [
  866. {
  867. "description": "关系数据",
  868. "name": "json",
  869. "in": "body",
  870. "required": true,
  871. "schema": {
  872. "$ref": "#/definitions/model.RelationJson"
  873. }
  874. }
  875. ],
  876. "responses": {
  877. "200": {
  878. "description": "OK",
  879. "schema": {
  880. "$ref": "#/definitions/response.Response"
  881. }
  882. }
  883. }
  884. }
  885. },
  886. "/relation/delete/{id}": {
  887. "delete": {
  888. "produces": [
  889. "application/json"
  890. ],
  891. "tags": [
  892. "用户关系模块"
  893. ],
  894. "summary": "根据关系id删除关系",
  895. "parameters": [
  896. {
  897. "type": "integer",
  898. "description": "关系id",
  899. "name": "id",
  900. "in": "path",
  901. "required": true
  902. }
  903. ],
  904. "responses": {
  905. "200": {
  906. "description": "OK",
  907. "schema": {
  908. "$ref": "#/definitions/response.Response"
  909. }
  910. }
  911. }
  912. }
  913. },
  914. "/relation/friend": {
  915. "get": {
  916. "produces": [
  917. "application/json"
  918. ],
  919. "tags": [
  920. "用户关系模块"
  921. ],
  922. "summary": "传入用户id获取用户好友列表",
  923. "parameters": [
  924. {
  925. "type": "integer",
  926. "description": "用户id",
  927. "name": "uid",
  928. "in": "query",
  929. "required": true
  930. }
  931. ],
  932. "responses": {
  933. "200": {
  934. "description": "OK",
  935. "schema": {
  936. "$ref": "#/definitions/response.Response"
  937. }
  938. }
  939. }
  940. }
  941. },
  942. "/user/info": {
  943. "get": {
  944. "produces": [
  945. "application/json"
  946. ],
  947. "tags": [
  948. "用户模块"
  949. ],
  950. "summary": "获取用户信息",
  951. "responses": {
  952. "200": {
  953. "description": "OK",
  954. "schema": {
  955. "$ref": "#/definitions/response.Response"
  956. }
  957. }
  958. }
  959. }
  960. },
  961. "/user/login": {
  962. "post": {
  963. "produces": [
  964. "application/json"
  965. ],
  966. "tags": [
  967. "用户模块"
  968. ],
  969. "summary": "登录",
  970. "parameters": [
  971. {
  972. "type": "string",
  973. "description": "微信ID",
  974. "name": "vid",
  975. "in": "formData"
  976. }
  977. ],
  978. "responses": {
  979. "200": {
  980. "description": "OK",
  981. "schema": {
  982. "$ref": "#/definitions/response.Response"
  983. }
  984. }
  985. }
  986. }
  987. },
  988. "/user/modify": {
  989. "post": {
  990. "consumes": [
  991. "application/json"
  992. ],
  993. "produces": [
  994. "application/json"
  995. ],
  996. "tags": [
  997. "用户模块"
  998. ],
  999. "summary": "修改用户信息",
  1000. "parameters": [
  1001. {
  1002. "description": "用户信息",
  1003. "name": "json",
  1004. "in": "body",
  1005. "required": true,
  1006. "schema": {
  1007. "$ref": "#/definitions/model.User"
  1008. }
  1009. }
  1010. ],
  1011. "responses": {
  1012. "200": {
  1013. "description": "OK",
  1014. "schema": {
  1015. "$ref": "#/definitions/response.Response"
  1016. }
  1017. }
  1018. }
  1019. }
  1020. },
  1021. "/user/register": {
  1022. "post": {
  1023. "consumes": [
  1024. "application/json"
  1025. ],
  1026. "produces": [
  1027. "application/json"
  1028. ],
  1029. "tags": [
  1030. "用户模块"
  1031. ],
  1032. "summary": "创建用户",
  1033. "parameters": [
  1034. {
  1035. "description": "用户信息",
  1036. "name": "json",
  1037. "in": "body",
  1038. "required": true,
  1039. "schema": {
  1040. "$ref": "#/definitions/model.UserJson"
  1041. }
  1042. }
  1043. ],
  1044. "responses": {
  1045. "200": {
  1046. "description": "OK",
  1047. "schema": {
  1048. "$ref": "#/definitions/response.Response"
  1049. }
  1050. }
  1051. }
  1052. }
  1053. }
  1054. },
  1055. "definitions": {
  1056. "model.Appraise": {
  1057. "type": "object",
  1058. "properties": {
  1059. "buyerId": {
  1060. "type": "integer"
  1061. },
  1062. "content": {
  1063. "type": "string"
  1064. },
  1065. "goodsId": {
  1066. "type": "integer"
  1067. },
  1068. "id": {
  1069. "type": "integer"
  1070. },
  1071. "star": {
  1072. "type": "integer"
  1073. },
  1074. "time": {
  1075. "type": "integer"
  1076. }
  1077. }
  1078. },
  1079. "model.AppraiseJson": {
  1080. "type": "object",
  1081. "properties": {
  1082. "buyerId": {
  1083. "type": "integer"
  1084. },
  1085. "content": {
  1086. "type": "string"
  1087. },
  1088. "goodsId": {
  1089. "type": "integer"
  1090. },
  1091. "star": {
  1092. "type": "integer"
  1093. },
  1094. "time": {
  1095. "type": "integer"
  1096. }
  1097. }
  1098. },
  1099. "model.CategoryJson": {
  1100. "type": "object",
  1101. "properties": {
  1102. "name": {
  1103. "type": "string"
  1104. },
  1105. "pic": {
  1106. "type": "string"
  1107. }
  1108. }
  1109. },
  1110. "model.Goods": {
  1111. "type": "object",
  1112. "properties": {
  1113. "desc": {
  1114. "type": "string"
  1115. },
  1116. "id": {
  1117. "type": "integer"
  1118. },
  1119. "integrity": {
  1120. "type": "integer"
  1121. },
  1122. "ownerId": {
  1123. "type": "integer"
  1124. },
  1125. "picId": {
  1126. "type": "integer"
  1127. },
  1128. "place": {
  1129. "type": "string"
  1130. },
  1131. "price": {
  1132. "type": "integer"
  1133. },
  1134. "state": {
  1135. "type": "integer"
  1136. },
  1137. "title": {
  1138. "type": "string"
  1139. }
  1140. }
  1141. },
  1142. "model.GoodsJson": {
  1143. "type": "object",
  1144. "properties": {
  1145. "categories": {
  1146. "type": "array",
  1147. "items": {
  1148. "type": "integer"
  1149. }
  1150. },
  1151. "desc": {
  1152. "type": "string"
  1153. },
  1154. "integrity": {
  1155. "type": "integer"
  1156. },
  1157. "ownerId": {
  1158. "type": "integer"
  1159. },
  1160. "pic_id": {
  1161. "type": "integer"
  1162. },
  1163. "place": {
  1164. "type": "string"
  1165. },
  1166. "price": {
  1167. "type": "integer"
  1168. },
  1169. "state": {
  1170. "type": "integer"
  1171. },
  1172. "title": {
  1173. "type": "string"
  1174. }
  1175. }
  1176. },
  1177. "model.OrderJson": {
  1178. "type": "object",
  1179. "properties": {
  1180. "buyerId": {
  1181. "type": "integer"
  1182. },
  1183. "goodsId": {
  1184. "type": "integer"
  1185. },
  1186. "phone": {
  1187. "type": "string"
  1188. },
  1189. "place": {
  1190. "type": "string"
  1191. },
  1192. "state": {
  1193. "type": "integer"
  1194. },
  1195. "time": {
  1196. "type": "integer"
  1197. }
  1198. }
  1199. },
  1200. "model.RelationJson": {
  1201. "type": "object",
  1202. "properties": {
  1203. "owner": {
  1204. "type": "integer"
  1205. },
  1206. "target": {
  1207. "type": "integer"
  1208. },
  1209. "type": {
  1210. "type": "integer"
  1211. }
  1212. }
  1213. },
  1214. "model.User": {
  1215. "type": "object",
  1216. "properties": {
  1217. "avatar": {
  1218. "type": "string"
  1219. },
  1220. "name": {
  1221. "type": "string"
  1222. },
  1223. "phone": {
  1224. "type": "string"
  1225. },
  1226. "uid": {
  1227. "type": "integer"
  1228. },
  1229. "vid": {
  1230. "type": "string"
  1231. }
  1232. }
  1233. },
  1234. "model.UserJson": {
  1235. "type": "object",
  1236. "properties": {
  1237. "avatar": {
  1238. "type": "string"
  1239. },
  1240. "name": {
  1241. "type": "string"
  1242. },
  1243. "phone": {
  1244. "type": "string"
  1245. },
  1246. "vid": {
  1247. "type": "string"
  1248. }
  1249. }
  1250. },
  1251. "response.Response": {
  1252. "type": "object",
  1253. "properties": {
  1254. "code": {
  1255. "type": "integer"
  1256. },
  1257. "data": {},
  1258. "message": {
  1259. "type": "string"
  1260. }
  1261. }
  1262. }
  1263. }
  1264. }`
  1265. // SwaggerInfo holds exported Swagger Info so clients can modify it
  1266. var SwaggerInfo = &swag.Spec{
  1267. Version: "1.0",
  1268. Host: "127.0.0.1:8084",
  1269. BasePath: "/WeChatTrading/trading-go",
  1270. Schemes: []string{},
  1271. Title: "二手交易",
  1272. Description: "一个基于微信小程序的校园二手交易平台的api文档",
  1273. InfoInstanceName: "swagger",
  1274. SwaggerTemplate: docTemplate,
  1275. LeftDelim: "{{",
  1276. RightDelim: "}}",
  1277. }
  1278. func init() {
  1279. swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
  1280. }