docs.go 40 KB

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