swagger.json 48 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544
  1. {
  2. "swagger": "2.0",
  3. "info": {
  4. "description": "This is a gateway server. On the page, you can go to do testing for every API.",
  5. "title": "Project cp-organization-management-gateway's APIs",
  6. "contact": {},
  7. "license": {},
  8. "version": "1.1"
  9. },
  10. "paths": {
  11. "/api/v1/log/list": {
  12. "get": {
  13. "description": "获取日志列表",
  14. "consumes": [
  15. "application/json"
  16. ],
  17. "produces": [
  18. "application/json"
  19. ],
  20. "tags": [
  21. "操作日志"
  22. ],
  23. "summary": "获取日志列表",
  24. "parameters": [
  25. {
  26. "type": "string",
  27. "description": "token",
  28. "name": "token",
  29. "in": "header",
  30. "required": true
  31. },
  32. {
  33. "type": "integer",
  34. "description": " ",
  35. "name": "page",
  36. "in": "query"
  37. },
  38. {
  39. "type": "integer",
  40. "description": " ",
  41. "name": "page_size",
  42. "in": "query"
  43. }
  44. ],
  45. "responses": {
  46. "200": {
  47. "description": "OK",
  48. "schema": {
  49. "$ref": "#/definitions/v1.ManagementLogListResponse"
  50. }
  51. },
  52. "500": {
  53. "description": "Internal Server Error",
  54. "schema": {
  55. "$ref": "#/definitions/base.HTTPError"
  56. }
  57. }
  58. }
  59. }
  60. },
  61. "/api/v1/system/rbac/group": {
  62. "put": {
  63. "description": "修改角色",
  64. "consumes": [
  65. "application/json"
  66. ],
  67. "produces": [
  68. "application/json"
  69. ],
  70. "tags": [
  71. "系统管理-角色管理"
  72. ],
  73. "summary": "修改角色",
  74. "parameters": [
  75. {
  76. "type": "string",
  77. "description": "token",
  78. "name": "token",
  79. "in": "header",
  80. "required": true
  81. },
  82. {
  83. "description": "token",
  84. "name": "body",
  85. "in": "body",
  86. "required": true,
  87. "schema": {
  88. "$ref": "#/definitions/v1.RbacGroupUpdateBody"
  89. }
  90. }
  91. ],
  92. "responses": {
  93. "200": {
  94. "description": "OK",
  95. "schema": {
  96. "$ref": "#/definitions/v1.RbacGroupUpdateResponse"
  97. }
  98. },
  99. "500": {
  100. "description": "Internal Server Error",
  101. "schema": {
  102. "$ref": "#/definitions/base.HTTPError"
  103. }
  104. }
  105. }
  106. },
  107. "post": {
  108. "description": "添加角色",
  109. "consumes": [
  110. "application/json"
  111. ],
  112. "produces": [
  113. "application/json"
  114. ],
  115. "tags": [
  116. "系统管理-角色管理"
  117. ],
  118. "summary": "添加角色",
  119. "parameters": [
  120. {
  121. "type": "string",
  122. "description": "token",
  123. "name": "token",
  124. "in": "header",
  125. "required": true
  126. },
  127. {
  128. "description": "token",
  129. "name": "body",
  130. "in": "body",
  131. "required": true,
  132. "schema": {
  133. "$ref": "#/definitions/v1.RbacGroupAddBody"
  134. }
  135. }
  136. ],
  137. "responses": {
  138. "200": {
  139. "description": "OK",
  140. "schema": {
  141. "$ref": "#/definitions/v1.RbacGroupAddResponse"
  142. }
  143. },
  144. "500": {
  145. "description": "Internal Server Error",
  146. "schema": {
  147. "$ref": "#/definitions/base.HTTPError"
  148. }
  149. }
  150. }
  151. }
  152. },
  153. "/api/v1/system/rbac/group/list": {
  154. "get": {
  155. "description": "角色列表",
  156. "consumes": [
  157. "application/json"
  158. ],
  159. "produces": [
  160. "application/json"
  161. ],
  162. "tags": [
  163. "系统管理-角色管理"
  164. ],
  165. "summary": "角色列表",
  166. "parameters": [
  167. {
  168. "type": "string",
  169. "description": "token",
  170. "name": "token",
  171. "in": "header",
  172. "required": true
  173. }
  174. ],
  175. "responses": {
  176. "200": {
  177. "description": "OK",
  178. "schema": {
  179. "$ref": "#/definitions/v1.RbacGroupListResponse"
  180. }
  181. },
  182. "500": {
  183. "description": "Internal Server Error",
  184. "schema": {
  185. "$ref": "#/definitions/base.HTTPError"
  186. }
  187. }
  188. }
  189. }
  190. },
  191. "/api/v1/system/rbac/group/{id}": {
  192. "delete": {
  193. "description": "删除角色",
  194. "consumes": [
  195. "application/json"
  196. ],
  197. "produces": [
  198. "application/json"
  199. ],
  200. "tags": [
  201. "系统管理-角色管理"
  202. ],
  203. "summary": "删除角色",
  204. "parameters": [
  205. {
  206. "type": "string",
  207. "description": "token",
  208. "name": "token",
  209. "in": "header",
  210. "required": true
  211. },
  212. {
  213. "type": "integer",
  214. "description": "token",
  215. "name": "id",
  216. "in": "path",
  217. "required": true
  218. }
  219. ],
  220. "responses": {
  221. "200": {
  222. "description": "OK",
  223. "schema": {
  224. "$ref": "#/definitions/v1.RbacGroupDelResponse"
  225. }
  226. },
  227. "500": {
  228. "description": "Internal Server Error",
  229. "schema": {
  230. "$ref": "#/definitions/base.HTTPError"
  231. }
  232. }
  233. }
  234. }
  235. },
  236. "/api/v1/system/rbac/node/list": {
  237. "get": {
  238. "description": "权限节点列表",
  239. "consumes": [
  240. "application/json"
  241. ],
  242. "produces": [
  243. "application/json"
  244. ],
  245. "tags": [
  246. "系统管理-角色管理"
  247. ],
  248. "summary": "权限节点列表",
  249. "parameters": [
  250. {
  251. "type": "string",
  252. "description": "token",
  253. "name": "token",
  254. "in": "header",
  255. "required": true
  256. },
  257. {
  258. "type": "integer",
  259. "description": "不填返回所有,填了返回该角色下的权限",
  260. "name": "group_id",
  261. "in": "query"
  262. },
  263. {
  264. "type": "boolean",
  265. "description": "填了groupid后,true:仅返回角色下的节点, false:返回所有节点,对属于该角色的节点作标记",
  266. "name": "only_select",
  267. "in": "query"
  268. }
  269. ],
  270. "responses": {
  271. "200": {
  272. "description": "OK",
  273. "schema": {
  274. "$ref": "#/definitions/v1.RbacNodeListResponse"
  275. }
  276. },
  277. "500": {
  278. "description": "Internal Server Error",
  279. "schema": {
  280. "$ref": "#/definitions/base.HTTPError"
  281. }
  282. }
  283. }
  284. }
  285. },
  286. "/api/v1/system/user": {
  287. "put": {
  288. "description": "修改用户",
  289. "consumes": [
  290. "application/json"
  291. ],
  292. "produces": [
  293. "application/json"
  294. ],
  295. "tags": [
  296. "系统管理-用户管理"
  297. ],
  298. "summary": "修改用户",
  299. "parameters": [
  300. {
  301. "type": "string",
  302. "description": "token",
  303. "name": "token",
  304. "in": "header",
  305. "required": true
  306. },
  307. {
  308. "description": " ",
  309. "name": "body",
  310. "in": "body",
  311. "required": true,
  312. "schema": {
  313. "$ref": "#/definitions/v1.UserUpdateBody"
  314. }
  315. }
  316. ],
  317. "responses": {
  318. "200": {
  319. "description": "OK",
  320. "schema": {
  321. "$ref": "#/definitions/v1.UserUpdateResponse"
  322. }
  323. },
  324. "500": {
  325. "description": "Internal Server Error",
  326. "schema": {
  327. "$ref": "#/definitions/base.HTTPError"
  328. }
  329. }
  330. }
  331. },
  332. "post": {
  333. "description": "创建用户",
  334. "consumes": [
  335. "application/json"
  336. ],
  337. "produces": [
  338. "application/json"
  339. ],
  340. "tags": [
  341. "系统管理-用户管理"
  342. ],
  343. "summary": "创建用户",
  344. "parameters": [
  345. {
  346. "type": "string",
  347. "description": "token",
  348. "name": "token",
  349. "in": "header",
  350. "required": true
  351. },
  352. {
  353. "description": " ",
  354. "name": "body",
  355. "in": "body",
  356. "required": true,
  357. "schema": {
  358. "$ref": "#/definitions/v1.UserCreateBody"
  359. }
  360. }
  361. ],
  362. "responses": {
  363. "200": {
  364. "description": "OK",
  365. "schema": {
  366. "$ref": "#/definitions/v1.UserCreateResponse"
  367. }
  368. },
  369. "500": {
  370. "description": "Internal Server Error",
  371. "schema": {
  372. "$ref": "#/definitions/base.HTTPError"
  373. }
  374. }
  375. }
  376. }
  377. },
  378. "/api/v1/system/user/info/{id}": {
  379. "get": {
  380. "description": "用户详情",
  381. "consumes": [
  382. "application/json"
  383. ],
  384. "produces": [
  385. "application/json"
  386. ],
  387. "tags": [
  388. "系统管理-用户管理"
  389. ],
  390. "summary": "用户详情",
  391. "parameters": [
  392. {
  393. "type": "string",
  394. "description": "token",
  395. "name": "token",
  396. "in": "header",
  397. "required": true
  398. },
  399. {
  400. "type": "integer",
  401. "description": " ",
  402. "name": "id",
  403. "in": "path",
  404. "required": true
  405. }
  406. ],
  407. "responses": {
  408. "200": {
  409. "description": "OK",
  410. "schema": {
  411. "$ref": "#/definitions/v1.UserInfoResponse"
  412. }
  413. },
  414. "500": {
  415. "description": "Internal Server Error",
  416. "schema": {
  417. "$ref": "#/definitions/base.HTTPError"
  418. }
  419. }
  420. }
  421. }
  422. },
  423. "/api/v1/system/user/list": {
  424. "get": {
  425. "description": "用户列表",
  426. "consumes": [
  427. "application/json"
  428. ],
  429. "produces": [
  430. "application/json"
  431. ],
  432. "tags": [
  433. "系统管理-用户管理"
  434. ],
  435. "summary": "用户列表",
  436. "parameters": [
  437. {
  438. "type": "string",
  439. "description": "token",
  440. "name": "token",
  441. "in": "header",
  442. "required": true
  443. },
  444. {
  445. "type": "integer",
  446. "description": " ",
  447. "name": "page",
  448. "in": "query"
  449. },
  450. {
  451. "type": "integer",
  452. "description": " ",
  453. "name": "page_size",
  454. "in": "query"
  455. },
  456. {
  457. "type": "string",
  458. "description": "姓名或账户名 ",
  459. "name": "name",
  460. "in": "query"
  461. },
  462. {
  463. "type": "string",
  464. "description": "区域 ",
  465. "name": "zone",
  466. "in": "query"
  467. }
  468. ],
  469. "responses": {
  470. "200": {
  471. "description": "OK",
  472. "schema": {
  473. "$ref": "#/definitions/v1.UserListResponse"
  474. }
  475. },
  476. "500": {
  477. "description": "Internal Server Error",
  478. "schema": {
  479. "$ref": "#/definitions/base.HTTPError"
  480. }
  481. }
  482. }
  483. }
  484. },
  485. "/api/v1/system/user/{id}": {
  486. "delete": {
  487. "description": "删除用户",
  488. "consumes": [
  489. "application/json"
  490. ],
  491. "produces": [
  492. "application/json"
  493. ],
  494. "tags": [
  495. "系统管理-用户管理"
  496. ],
  497. "summary": "删除用户",
  498. "parameters": [
  499. {
  500. "type": "string",
  501. "description": "token",
  502. "name": "token",
  503. "in": "header",
  504. "required": true
  505. },
  506. {
  507. "type": "integer",
  508. "description": " ",
  509. "name": "id",
  510. "in": "path",
  511. "required": true
  512. }
  513. ],
  514. "responses": {
  515. "200": {
  516. "description": "OK",
  517. "schema": {
  518. "$ref": "#/definitions/v1.UserDelResponse"
  519. }
  520. },
  521. "500": {
  522. "description": "Internal Server Error",
  523. "schema": {
  524. "$ref": "#/definitions/base.HTTPError"
  525. }
  526. }
  527. }
  528. }
  529. },
  530. "/api/v1/token_refresh": {
  531. "put": {
  532. "description": "刷新token",
  533. "consumes": [
  534. "application/json"
  535. ],
  536. "produces": [
  537. "application/json"
  538. ],
  539. "tags": [
  540. "用户"
  541. ],
  542. "summary": "刷新token",
  543. "parameters": [
  544. {
  545. "type": "string",
  546. "description": "token",
  547. "name": "token",
  548. "in": "header",
  549. "required": true
  550. }
  551. ],
  552. "responses": {
  553. "200": {
  554. "description": "OK",
  555. "schema": {
  556. "$ref": "#/definitions/v1.TokenResponse"
  557. }
  558. },
  559. "500": {
  560. "description": "Internal Server Error",
  561. "schema": {
  562. "$ref": "#/definitions/base.HTTPError"
  563. }
  564. }
  565. }
  566. }
  567. },
  568. "/api/v1/user/login": {
  569. "post": {
  570. "description": "登录",
  571. "consumes": [
  572. "application/json"
  573. ],
  574. "produces": [
  575. "application/json"
  576. ],
  577. "tags": [
  578. "用户"
  579. ],
  580. "summary": "登录",
  581. "parameters": [
  582. {
  583. "description": "登录信息",
  584. "name": "body",
  585. "in": "body",
  586. "required": true,
  587. "schema": {
  588. "$ref": "#/definitions/v1.LoginBody"
  589. }
  590. }
  591. ],
  592. "responses": {
  593. "200": {
  594. "description": "OK",
  595. "schema": {
  596. "$ref": "#/definitions/v1.LoginResponse"
  597. }
  598. },
  599. "500": {
  600. "description": "Internal Server Error",
  601. "schema": {
  602. "$ref": "#/definitions/base.HTTPError"
  603. }
  604. }
  605. }
  606. }
  607. },
  608. "/api/v1/zone": {
  609. "put": {
  610. "description": "修改区域",
  611. "consumes": [
  612. "application/json"
  613. ],
  614. "produces": [
  615. "application/json"
  616. ],
  617. "tags": [
  618. "区域"
  619. ],
  620. "summary": "修改区域",
  621. "parameters": [
  622. {
  623. "type": "string",
  624. "description": "token",
  625. "name": "token",
  626. "in": "header",
  627. "required": true
  628. },
  629. {
  630. "description": " ",
  631. "name": "body",
  632. "in": "body",
  633. "required": true,
  634. "schema": {
  635. "$ref": "#/definitions/v1.ZoneUpdateBody"
  636. }
  637. }
  638. ],
  639. "responses": {
  640. "200": {
  641. "description": "OK",
  642. "schema": {
  643. "$ref": "#/definitions/v1.ZoneUpdateResponse"
  644. }
  645. },
  646. "500": {
  647. "description": "Internal Server Error",
  648. "schema": {
  649. "$ref": "#/definitions/base.HTTPError"
  650. }
  651. }
  652. }
  653. },
  654. "post": {
  655. "description": "添加区域",
  656. "consumes": [
  657. "application/json"
  658. ],
  659. "produces": [
  660. "application/json"
  661. ],
  662. "tags": [
  663. "区域"
  664. ],
  665. "summary": "添加区域",
  666. "parameters": [
  667. {
  668. "type": "string",
  669. "description": "token",
  670. "name": "token",
  671. "in": "header",
  672. "required": true
  673. },
  674. {
  675. "description": " ",
  676. "name": "body",
  677. "in": "body",
  678. "required": true,
  679. "schema": {
  680. "$ref": "#/definitions/v1.ZoneAddBody"
  681. }
  682. }
  683. ],
  684. "responses": {
  685. "200": {
  686. "description": "OK",
  687. "schema": {
  688. "$ref": "#/definitions/v1.ZoneAddResponse"
  689. }
  690. },
  691. "500": {
  692. "description": "Internal Server Error",
  693. "schema": {
  694. "$ref": "#/definitions/base.HTTPError"
  695. }
  696. }
  697. }
  698. }
  699. },
  700. "/api/v1/zone/list": {
  701. "get": {
  702. "description": "区域列表",
  703. "consumes": [
  704. "application/json"
  705. ],
  706. "produces": [
  707. "application/json"
  708. ],
  709. "tags": [
  710. "区域"
  711. ],
  712. "summary": "区域列表",
  713. "parameters": [
  714. {
  715. "type": "string",
  716. "description": "token",
  717. "name": "token",
  718. "in": "header",
  719. "required": true
  720. }
  721. ],
  722. "responses": {
  723. "200": {
  724. "description": "OK",
  725. "schema": {
  726. "$ref": "#/definitions/v1.ZoneListResponse"
  727. }
  728. },
  729. "500": {
  730. "description": "Internal Server Error",
  731. "schema": {
  732. "$ref": "#/definitions/base.HTTPError"
  733. }
  734. }
  735. }
  736. }
  737. },
  738. "/api/v1/zone/{zone_code}": {
  739. "delete": {
  740. "description": "删除区域",
  741. "consumes": [
  742. "application/json"
  743. ],
  744. "produces": [
  745. "application/json"
  746. ],
  747. "tags": [
  748. "区域"
  749. ],
  750. "summary": "删除区域",
  751. "parameters": [
  752. {
  753. "type": "string",
  754. "description": "token",
  755. "name": "token",
  756. "in": "header",
  757. "required": true
  758. },
  759. {
  760. "type": "string",
  761. "description": " ",
  762. "name": "zone_code",
  763. "in": "path",
  764. "required": true
  765. }
  766. ],
  767. "responses": {
  768. "200": {
  769. "description": "OK",
  770. "schema": {
  771. "$ref": "#/definitions/v1.ZoneDelResponse"
  772. }
  773. },
  774. "500": {
  775. "description": "Internal Server Error",
  776. "schema": {
  777. "$ref": "#/definitions/base.HTTPError"
  778. }
  779. }
  780. }
  781. }
  782. }
  783. },
  784. "definitions": {
  785. "base.HTTPError": {
  786. "type": "object",
  787. "properties": {
  788. "code": {
  789. "type": "integer",
  790. "format": "int",
  791. "example": 500
  792. },
  793. "message": {
  794. "type": "string",
  795. "example": "status bad request"
  796. }
  797. }
  798. },
  799. "v1.CreateManagementUserReply": {
  800. "type": "object",
  801. "properties": {
  802. "uid": {
  803. "type": "integer"
  804. }
  805. }
  806. },
  807. "v1.LoginBody": {
  808. "type": "object",
  809. "properties": {
  810. "key": {
  811. "type": "string"
  812. },
  813. "password": {
  814. "type": "string"
  815. },
  816. "user": {
  817. "type": "string"
  818. }
  819. }
  820. },
  821. "v1.LoginData": {
  822. "type": "object",
  823. "properties": {
  824. "organization": {
  825. "type": "string"
  826. },
  827. "refresh_token": {
  828. "type": "string"
  829. },
  830. "token": {
  831. "type": "string"
  832. },
  833. "uid": {
  834. "type": "integer"
  835. },
  836. "user": {
  837. "type": "string"
  838. }
  839. }
  840. },
  841. "v1.LoginResponse": {
  842. "type": "object",
  843. "properties": {
  844. "code": {
  845. "description": "返回码",
  846. "type": "integer",
  847. "format": "int",
  848. "default": 0
  849. },
  850. "data": {
  851. "type": "object",
  852. "$ref": "#/definitions/v1.LoginData"
  853. },
  854. "message": {
  855. "description": "消息",
  856. "type": "string",
  857. "default": "success"
  858. }
  859. }
  860. },
  861. "v1.ManagementLogItem": {
  862. "type": "object",
  863. "properties": {
  864. "action": {
  865. "description": "行为",
  866. "type": "string"
  867. },
  868. "created_at": {
  869. "description": "时间",
  870. "type": "string"
  871. },
  872. "id": {
  873. "description": "日志id",
  874. "type": "integer"
  875. },
  876. "module": {
  877. "description": "模块",
  878. "type": "string"
  879. },
  880. "origin": {
  881. "description": "修改前信息",
  882. "type": "string"
  883. },
  884. "target": {
  885. "description": "修改后信息",
  886. "type": "string"
  887. },
  888. "uid": {
  889. "description": "账号id",
  890. "type": "integer"
  891. },
  892. "username": {
  893. "description": "账号名",
  894. "type": "string"
  895. }
  896. }
  897. },
  898. "v1.ManagementLogListReply": {
  899. "type": "object",
  900. "properties": {
  901. "list": {
  902. "type": "array",
  903. "items": {
  904. "$ref": "#/definitions/v1.ManagementLogItem"
  905. }
  906. },
  907. "page": {
  908. "type": "integer"
  909. },
  910. "total": {
  911. "type": "integer"
  912. }
  913. }
  914. },
  915. "v1.ManagementLogListResponse": {
  916. "type": "object",
  917. "properties": {
  918. "code": {
  919. "description": "返回码",
  920. "type": "integer",
  921. "format": "int",
  922. "default": 0
  923. },
  924. "data": {
  925. "type": "object",
  926. "$ref": "#/definitions/v1.ManagementLogListReply"
  927. },
  928. "message": {
  929. "description": "消息",
  930. "type": "string",
  931. "default": "success"
  932. }
  933. }
  934. },
  935. "v1.RbacGroupAddBody": {
  936. "type": "object",
  937. "properties": {
  938. "name": {
  939. "type": "string"
  940. },
  941. "node_list": {
  942. "type": "string"
  943. }
  944. }
  945. },
  946. "v1.RbacGroupAddReply": {
  947. "type": "object",
  948. "properties": {
  949. "id": {
  950. "type": "integer"
  951. }
  952. }
  953. },
  954. "v1.RbacGroupAddResponse": {
  955. "type": "object",
  956. "properties": {
  957. "code": {
  958. "description": "返回码",
  959. "type": "integer",
  960. "format": "int",
  961. "default": 0
  962. },
  963. "data": {
  964. "type": "object",
  965. "$ref": "#/definitions/v1.RbacGroupAddReply"
  966. },
  967. "message": {
  968. "description": "消息",
  969. "type": "string",
  970. "default": "success"
  971. }
  972. }
  973. },
  974. "v1.RbacGroupDelResponse": {
  975. "type": "object",
  976. "properties": {
  977. "code": {
  978. "description": "返回码",
  979. "type": "integer",
  980. "format": "int",
  981. "default": 0
  982. },
  983. "message": {
  984. "description": "消息",
  985. "type": "string",
  986. "default": "success"
  987. }
  988. }
  989. },
  990. "v1.RbacGroupItem": {
  991. "type": "object",
  992. "properties": {
  993. "id": {
  994. "type": "integer"
  995. },
  996. "name": {
  997. "type": "string"
  998. }
  999. }
  1000. },
  1001. "v1.RbacGroupListReply": {
  1002. "type": "object",
  1003. "properties": {
  1004. "list": {
  1005. "type": "array",
  1006. "items": {
  1007. "$ref": "#/definitions/v1.RbacGroupItem"
  1008. }
  1009. }
  1010. }
  1011. },
  1012. "v1.RbacGroupListResponse": {
  1013. "type": "object",
  1014. "properties": {
  1015. "code": {
  1016. "description": "返回码",
  1017. "type": "integer",
  1018. "format": "int",
  1019. "default": 0
  1020. },
  1021. "data": {
  1022. "type": "object",
  1023. "$ref": "#/definitions/v1.RbacGroupListReply"
  1024. },
  1025. "message": {
  1026. "description": "消息",
  1027. "type": "string",
  1028. "default": "success"
  1029. }
  1030. }
  1031. },
  1032. "v1.RbacGroupUpdateBody": {
  1033. "type": "object",
  1034. "properties": {
  1035. "id": {
  1036. "type": "integer"
  1037. },
  1038. "name": {
  1039. "type": "string"
  1040. },
  1041. "node_list": {
  1042. "type": "string"
  1043. }
  1044. }
  1045. },
  1046. "v1.RbacGroupUpdateResponse": {
  1047. "type": "object",
  1048. "properties": {
  1049. "code": {
  1050. "description": "返回码",
  1051. "type": "integer",
  1052. "format": "int",
  1053. "default": 0
  1054. },
  1055. "message": {
  1056. "description": "消息",
  1057. "type": "string",
  1058. "default": "success"
  1059. }
  1060. }
  1061. },
  1062. "v1.RbacNodeItem": {
  1063. "type": "object",
  1064. "properties": {
  1065. "childs": {
  1066. "type": "array",
  1067. "items": {
  1068. "$ref": "#/definitions/v1.RbacNodeItem"
  1069. }
  1070. },
  1071. "id": {
  1072. "type": "integer"
  1073. },
  1074. "method": {
  1075. "type": "string"
  1076. },
  1077. "name": {
  1078. "type": "string"
  1079. },
  1080. "object": {
  1081. "type": "string"
  1082. },
  1083. "pid": {
  1084. "type": "integer"
  1085. },
  1086. "resource": {
  1087. "type": "string"
  1088. },
  1089. "router": {
  1090. "type": "string"
  1091. },
  1092. "select": {
  1093. "type": "boolean"
  1094. }
  1095. }
  1096. },
  1097. "v1.RbacNodeListReply": {
  1098. "type": "object",
  1099. "properties": {
  1100. "list": {
  1101. "type": "array",
  1102. "items": {
  1103. "$ref": "#/definitions/v1.RbacNodeItem"
  1104. }
  1105. }
  1106. }
  1107. },
  1108. "v1.RbacNodeListResponse": {
  1109. "type": "object",
  1110. "properties": {
  1111. "code": {
  1112. "description": "返回码",
  1113. "type": "integer",
  1114. "format": "int",
  1115. "default": 0
  1116. },
  1117. "data": {
  1118. "type": "object",
  1119. "$ref": "#/definitions/v1.RbacNodeListReply"
  1120. },
  1121. "message": {
  1122. "description": "消息",
  1123. "type": "string",
  1124. "default": "success"
  1125. }
  1126. }
  1127. },
  1128. "v1.TokenResponse": {
  1129. "type": "object",
  1130. "properties": {
  1131. "code": {
  1132. "description": "返回码",
  1133. "type": "integer",
  1134. "format": "int",
  1135. "default": 0
  1136. },
  1137. "data": {
  1138. "type": "string"
  1139. },
  1140. "message": {
  1141. "description": "消息",
  1142. "type": "string",
  1143. "default": "success"
  1144. },
  1145. "refresh_token": {
  1146. "type": "string"
  1147. }
  1148. }
  1149. },
  1150. "v1.UserCreateBody": {
  1151. "type": "object",
  1152. "properties": {
  1153. "email": {
  1154. "type": "string"
  1155. },
  1156. "group_id": {
  1157. "type": "integer"
  1158. },
  1159. "name": {
  1160. "description": "姓名",
  1161. "type": "string"
  1162. },
  1163. "password": {
  1164. "type": "string"
  1165. },
  1166. "phone": {
  1167. "type": "string"
  1168. },
  1169. "username": {
  1170. "description": "账户名",
  1171. "type": "string"
  1172. },
  1173. "zones": {
  1174. "type": "string"
  1175. }
  1176. }
  1177. },
  1178. "v1.UserCreateResponse": {
  1179. "type": "object",
  1180. "properties": {
  1181. "code": {
  1182. "description": "返回码",
  1183. "type": "integer",
  1184. "format": "int",
  1185. "default": 0
  1186. },
  1187. "data": {
  1188. "type": "object",
  1189. "$ref": "#/definitions/v1.CreateManagementUserReply"
  1190. },
  1191. "message": {
  1192. "description": "消息",
  1193. "type": "string",
  1194. "default": "success"
  1195. }
  1196. }
  1197. },
  1198. "v1.UserDelResponse": {
  1199. "type": "object",
  1200. "properties": {
  1201. "code": {
  1202. "description": "返回码",
  1203. "type": "integer",
  1204. "format": "int",
  1205. "default": 0
  1206. },
  1207. "message": {
  1208. "description": "消息",
  1209. "type": "string",
  1210. "default": "success"
  1211. }
  1212. }
  1213. },
  1214. "v1.UserInfoReply": {
  1215. "type": "object",
  1216. "properties": {
  1217. "email": {
  1218. "type": "string"
  1219. },
  1220. "group_id": {
  1221. "description": "所属角色",
  1222. "type": "integer"
  1223. },
  1224. "group_name": {
  1225. "type": "string"
  1226. },
  1227. "id": {
  1228. "type": "integer"
  1229. },
  1230. "name": {
  1231. "type": "string"
  1232. },
  1233. "node_list": {
  1234. "description": "所拥有的权限",
  1235. "type": "array",
  1236. "items": {
  1237. "$ref": "#/definitions/v1.RbacNodeItem"
  1238. }
  1239. },
  1240. "phone": {
  1241. "type": "string"
  1242. },
  1243. "username": {
  1244. "type": "string"
  1245. },
  1246. "zone_list": {
  1247. "type": "array",
  1248. "items": {
  1249. "$ref": "#/definitions/v1.ZoneItemSelect"
  1250. }
  1251. }
  1252. }
  1253. },
  1254. "v1.UserInfoResponse": {
  1255. "type": "object",
  1256. "properties": {
  1257. "code": {
  1258. "description": "返回码",
  1259. "type": "integer",
  1260. "format": "int",
  1261. "default": 0
  1262. },
  1263. "data": {
  1264. "type": "object",
  1265. "$ref": "#/definitions/v1.UserInfoReply"
  1266. },
  1267. "message": {
  1268. "description": "消息",
  1269. "type": "string",
  1270. "default": "success"
  1271. }
  1272. }
  1273. },
  1274. "v1.UserItem": {
  1275. "type": "object",
  1276. "properties": {
  1277. "email": {
  1278. "type": "string"
  1279. },
  1280. "id": {
  1281. "type": "integer"
  1282. },
  1283. "name": {
  1284. "type": "string"
  1285. },
  1286. "phone": {
  1287. "type": "string"
  1288. },
  1289. "username": {
  1290. "type": "string"
  1291. },
  1292. "zones": {
  1293. "type": "array",
  1294. "items": {
  1295. "type": "string"
  1296. }
  1297. }
  1298. }
  1299. },
  1300. "v1.UserListReply": {
  1301. "type": "object",
  1302. "properties": {
  1303. "list": {
  1304. "type": "array",
  1305. "items": {
  1306. "$ref": "#/definitions/v1.UserItem"
  1307. }
  1308. },
  1309. "page": {
  1310. "type": "integer"
  1311. },
  1312. "total": {
  1313. "type": "integer"
  1314. }
  1315. }
  1316. },
  1317. "v1.UserListResponse": {
  1318. "type": "object",
  1319. "properties": {
  1320. "code": {
  1321. "description": "返回码",
  1322. "type": "integer",
  1323. "format": "int",
  1324. "default": 0
  1325. },
  1326. "data": {
  1327. "type": "object",
  1328. "$ref": "#/definitions/v1.UserListReply"
  1329. },
  1330. "message": {
  1331. "description": "消息",
  1332. "type": "string",
  1333. "default": "success"
  1334. }
  1335. }
  1336. },
  1337. "v1.UserUpdateBody": {
  1338. "type": "object",
  1339. "properties": {
  1340. "email": {
  1341. "type": "string"
  1342. },
  1343. "group_id": {
  1344. "type": "integer"
  1345. },
  1346. "id": {
  1347. "type": "integer"
  1348. },
  1349. "name": {
  1350. "description": "姓名",
  1351. "type": "string"
  1352. },
  1353. "password": {
  1354. "type": "string"
  1355. },
  1356. "phone": {
  1357. "type": "string"
  1358. },
  1359. "username": {
  1360. "description": "账户名",
  1361. "type": "string"
  1362. },
  1363. "zones": {
  1364. "type": "string"
  1365. }
  1366. }
  1367. },
  1368. "v1.UserUpdateResponse": {
  1369. "type": "object",
  1370. "properties": {
  1371. "code": {
  1372. "description": "返回码",
  1373. "type": "integer",
  1374. "format": "int",
  1375. "default": 0
  1376. },
  1377. "message": {
  1378. "description": "消息",
  1379. "type": "string",
  1380. "default": "success"
  1381. }
  1382. }
  1383. },
  1384. "v1.ZoneAddBody": {
  1385. "type": "object",
  1386. "properties": {
  1387. "parent_zone_code": {
  1388. "type": "string"
  1389. },
  1390. "zone_name": {
  1391. "type": "string"
  1392. }
  1393. }
  1394. },
  1395. "v1.ZoneAddReply": {
  1396. "type": "object",
  1397. "properties": {
  1398. "zone_code": {
  1399. "type": "string"
  1400. }
  1401. }
  1402. },
  1403. "v1.ZoneAddResponse": {
  1404. "type": "object",
  1405. "properties": {
  1406. "code": {
  1407. "description": "返回码",
  1408. "type": "integer",
  1409. "format": "int",
  1410. "default": 0
  1411. },
  1412. "data": {
  1413. "type": "object",
  1414. "$ref": "#/definitions/v1.ZoneAddReply"
  1415. },
  1416. "message": {
  1417. "description": "消息",
  1418. "type": "string",
  1419. "default": "success"
  1420. }
  1421. }
  1422. },
  1423. "v1.ZoneDelResponse": {
  1424. "type": "object",
  1425. "properties": {
  1426. "code": {
  1427. "description": "返回码",
  1428. "type": "integer",
  1429. "format": "int",
  1430. "default": 0
  1431. },
  1432. "message": {
  1433. "description": "消息",
  1434. "type": "string",
  1435. "default": "success"
  1436. }
  1437. }
  1438. },
  1439. "v1.ZoneItem": {
  1440. "type": "object",
  1441. "properties": {
  1442. "childs": {
  1443. "type": "array",
  1444. "items": {
  1445. "$ref": "#/definitions/v1.ZoneItem"
  1446. }
  1447. },
  1448. "parent_zone_code": {
  1449. "type": "string"
  1450. },
  1451. "zone_code": {
  1452. "type": "string"
  1453. },
  1454. "zone_name": {
  1455. "type": "string"
  1456. }
  1457. }
  1458. },
  1459. "v1.ZoneItemSelect": {
  1460. "type": "object",
  1461. "properties": {
  1462. "childs": {
  1463. "type": "array",
  1464. "items": {
  1465. "$ref": "#/definitions/v1.ZoneItemSelect"
  1466. }
  1467. },
  1468. "parent_zone_code": {
  1469. "type": "string"
  1470. },
  1471. "select": {
  1472. "type": "boolean"
  1473. },
  1474. "zone_code": {
  1475. "type": "string"
  1476. },
  1477. "zone_name": {
  1478. "type": "string"
  1479. }
  1480. }
  1481. },
  1482. "v1.ZoneListReply": {
  1483. "type": "object",
  1484. "properties": {
  1485. "list": {
  1486. "type": "array",
  1487. "items": {
  1488. "$ref": "#/definitions/v1.ZoneItem"
  1489. }
  1490. }
  1491. }
  1492. },
  1493. "v1.ZoneListResponse": {
  1494. "type": "object",
  1495. "properties": {
  1496. "code": {
  1497. "description": "返回码",
  1498. "type": "integer",
  1499. "format": "int",
  1500. "default": 0
  1501. },
  1502. "data": {
  1503. "type": "object",
  1504. "$ref": "#/definitions/v1.ZoneListReply"
  1505. },
  1506. "message": {
  1507. "description": "消息",
  1508. "type": "string",
  1509. "default": "success"
  1510. }
  1511. }
  1512. },
  1513. "v1.ZoneUpdateBody": {
  1514. "type": "object",
  1515. "properties": {
  1516. "parent_zone_code": {
  1517. "type": "string"
  1518. },
  1519. "zone_code": {
  1520. "type": "string"
  1521. },
  1522. "zone_name": {
  1523. "type": "string"
  1524. }
  1525. }
  1526. },
  1527. "v1.ZoneUpdateResponse": {
  1528. "type": "object",
  1529. "properties": {
  1530. "code": {
  1531. "description": "返回码",
  1532. "type": "integer",
  1533. "format": "int",
  1534. "default": 0
  1535. },
  1536. "message": {
  1537. "description": "消息",
  1538. "type": "string",
  1539. "default": "success"
  1540. }
  1541. }
  1542. }
  1543. }
  1544. }