swagger.yaml 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. definitions:
  2. models.CreateChatroomReq:
  3. properties:
  4. bCreatorId:
  5. type: string
  6. creatorId:
  7. type: string
  8. userCount:
  9. type: integer
  10. type: object
  11. models.JoinChatroomParam:
  12. properties:
  13. roomId:
  14. type: string
  15. userId:
  16. type: string
  17. type: object
  18. models.JoinChatroomReq:
  19. properties:
  20. bCreatorId:
  21. type: string
  22. creatorId:
  23. type: string
  24. userCount:
  25. type: integer
  26. type: object
  27. models.LeaveChatroomParam:
  28. properties:
  29. roomId:
  30. type: string
  31. userId:
  32. type: string
  33. type: object
  34. models.MessageParam:
  35. properties:
  36. message:
  37. type: string
  38. messageType:
  39. type: string
  40. roomId:
  41. type: string
  42. userId:
  43. type: string
  44. type: object
  45. models.NoticeReadReq:
  46. properties:
  47. app_id:
  48. type: string
  49. notice_id:
  50. type: string
  51. user_id:
  52. type: string
  53. type: object
  54. info:
  55. contact: {}
  56. paths:
  57. /api/chatroom/create:
  58. post:
  59. consumes:
  60. - application/json
  61. description: 创建聊天室
  62. parameters:
  63. - description: 创建聊天室请求body
  64. in: body
  65. name: body
  66. required: true
  67. schema:
  68. $ref: '#/definitions/models.CreateChatroomReq'
  69. produces:
  70. - application/json
  71. responses:
  72. "200":
  73. description: '{"code":200, "message":"success"}'
  74. schema:
  75. type: string
  76. summary: 创建聊天室
  77. tags:
  78. - 房间管理
  79. /api/chatroom/delete:
  80. get:
  81. consumes:
  82. - application/json
  83. description: 删除聊天室
  84. parameters:
  85. - description: 用户ID
  86. in: query
  87. name: userId
  88. required: true
  89. type: string
  90. - description: 房间ID
  91. in: query
  92. name: roomId
  93. required: true
  94. type: string
  95. produces:
  96. - application/json
  97. responses:
  98. "200":
  99. description: '{"code":200, "message":"success"}'
  100. schema:
  101. type: string
  102. summary: 删除聊天室
  103. tags:
  104. - 房间管理
  105. /api/chatroom/detail:
  106. get:
  107. consumes:
  108. - application/json
  109. description: 获取房间详情
  110. parameters:
  111. - description: 房间id
  112. in: query
  113. name: room_id
  114. required: true
  115. type: string
  116. produces:
  117. - application/json
  118. responses:
  119. "200":
  120. description: '{"code":200, "message":"success"}'
  121. schema:
  122. type: string
  123. summary: 获取房间详情
  124. tags:
  125. - 房间操作
  126. /api/chatroom/join:
  127. post:
  128. consumes:
  129. - application/json
  130. description: 加入房间
  131. parameters:
  132. - description: 加入房间请求body
  133. in: body
  134. name: body
  135. required: true
  136. schema:
  137. $ref: '#/definitions/models.JoinChatroomParam'
  138. produces:
  139. - application/json
  140. responses:
  141. "200":
  142. description: '{"code":200, "message":"success"}'
  143. schema:
  144. type: string
  145. summary: 加入房间
  146. tags:
  147. - 房间管理
  148. /api/chatroom/joinCreate:
  149. post:
  150. consumes:
  151. - application/json
  152. description: 创建并加入房间
  153. parameters:
  154. - description: 创建并加入房间请求body
  155. in: body
  156. name: body
  157. required: true
  158. schema:
  159. $ref: '#/definitions/models.JoinChatroomReq'
  160. produces:
  161. - application/json
  162. responses:
  163. "200":
  164. description: '{"code":200, "message":"success"}'
  165. schema:
  166. type: string
  167. summary: 创建并加入房间
  168. tags:
  169. - 房间管理
  170. /api/chatroom/leave:
  171. post:
  172. consumes:
  173. - application/json
  174. description: 离开房间
  175. parameters:
  176. - description: 离开房间请求body
  177. in: body
  178. name: body
  179. required: true
  180. schema:
  181. $ref: '#/definitions/models.LeaveChatroomParam'
  182. produces:
  183. - application/json
  184. responses:
  185. "200":
  186. description: '{"code":200, "message":"success"}'
  187. schema:
  188. type: string
  189. summary: 离开房间
  190. tags:
  191. - 房间管理
  192. /api/chatroom/list:
  193. get:
  194. consumes:
  195. - application/json
  196. description: 获取聊天室列表
  197. parameters:
  198. - description: 用户ID
  199. in: query
  200. name: userId
  201. required: true
  202. type: string
  203. produces:
  204. - application/json
  205. responses:
  206. "200":
  207. description: '{"code":200, "message":"success"}'
  208. schema:
  209. type: string
  210. summary: 获取聊天室列表
  211. tags:
  212. - 房间管理
  213. /api/message/deleteInteract:
  214. get:
  215. description: 互动删除
  216. parameters:
  217. - description: id
  218. in: query
  219. name: id
  220. required: true
  221. type: string
  222. - description: 互动类型
  223. in: query
  224. name: int_type
  225. required: true
  226. type: string
  227. produces:
  228. - application/json
  229. responses:
  230. "200":
  231. description: '{"code":200, "message":"success", "data":{}}'
  232. schema:
  233. type: string
  234. summary: 互动删除
  235. tags:
  236. - 消息管理
  237. /api/message/interact:
  238. get:
  239. description: 获取互动
  240. parameters:
  241. - description: 用户id
  242. in: query
  243. name: userId
  244. required: true
  245. type: string
  246. produces:
  247. - application/json
  248. responses:
  249. "200":
  250. description: '{"code":200, "message":"success", "data":{}}'
  251. schema:
  252. type: string
  253. summary: 获取互动
  254. tags:
  255. - 消息管理
  256. /api/message/notice:
  257. get:
  258. description: 获取公告
  259. parameters:
  260. - description: 用户id
  261. in: query
  262. name: userId
  263. type: string
  264. produces:
  265. - application/json
  266. responses:
  267. "200":
  268. description: '{"code":200, "message":"success", "data":{}}'
  269. schema:
  270. type: string
  271. summary: 获取公告
  272. tags:
  273. - 消息管理
  274. /api/message/notice/read:
  275. post:
  276. description: 公告阅读
  277. parameters:
  278. - description: 阅读公告
  279. in: body
  280. name: body
  281. required: true
  282. schema:
  283. $ref: '#/definitions/models.NoticeReadReq'
  284. produces:
  285. - application/json
  286. responses:
  287. "200":
  288. description: '{"code":200,"message":"success","data":{}}'
  289. schema:
  290. type: string
  291. summary: 公告阅读
  292. tags:
  293. - 消息管理
  294. /api/message/send:
  295. post:
  296. consumes:
  297. - application/json
  298. description: 发送消息
  299. parameters:
  300. - description: 发送请求body
  301. in: body
  302. name: body
  303. required: true
  304. schema:
  305. $ref: '#/definitions/models.MessageParam'
  306. produces:
  307. - application/json
  308. responses:
  309. "200":
  310. description: '{"code":200, "message":"success"}'
  311. schema:
  312. type: string
  313. summary: 发送消息
  314. tags:
  315. - 消息管理
  316. /api/message/timeline:
  317. get:
  318. description: 获取历史消息记录
  319. parameters:
  320. - description: 用户id
  321. in: query
  322. name: userId
  323. type: string
  324. - description: 房间id
  325. in: query
  326. name: roomId
  327. required: true
  328. type: string
  329. - description: 当前页
  330. in: query
  331. name: pageIndex
  332. required: true
  333. type: integer
  334. - description: 每页数量
  335. in: query
  336. name: pageSize
  337. required: true
  338. type: integer
  339. produces:
  340. - application/json
  341. responses:
  342. "200":
  343. description: '{"code":200, "message":"success", "data":{}}'
  344. schema:
  345. type: string
  346. summary: 获取历史消息记录
  347. tags:
  348. - 消息管理
  349. swagger: "2.0"