docs.go 38 KB

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