swagger.yaml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. definitions:
  2. base.HTTPError:
  3. properties:
  4. code:
  5. example: 500
  6. format: int
  7. type: integer
  8. message:
  9. example: status bad request
  10. type: string
  11. type: object
  12. v1.AttendanceRequest:
  13. properties:
  14. datetime:
  15. type: string
  16. direction:
  17. type: integer
  18. id_card_number:
  19. type: string
  20. id_card_type:
  21. type: integer
  22. sn:
  23. type: string
  24. team_name:
  25. type: string
  26. team_sys_no:
  27. description: |-
  28. json 数组 Content 里面的内容用 des 加密 deskey: 对接的时候提供,
  29. 加密前格式:
  30. {
  31. "count": 2,
  32. "logs":[
  33. {"sn": "XXXX","user_id": "XXXXX","recog_time":
  34. "yyyy-Mm-dd HH:mm:SS"},
  35. {"sn": "XXXX","user_id": "XXXXX","recog_time": "yyyy-M
  36. m-dd HH:mm:SS"}
  37. ] }
  38. AppKey string `form:"app_key" json:"app_key" binding:"required"`
  39. type: integer
  40. work_name:
  41. type: string
  42. work_no:
  43. type: string
  44. required:
  45. - sn
  46. type: object
  47. v1.AttendanceResponse:
  48. properties:
  49. code:
  50. default: 0
  51. description: 返回码
  52. format: int
  53. type: integer
  54. message:
  55. default: success
  56. description: 消息
  57. type: string
  58. type: object
  59. v1.LoginBody:
  60. properties:
  61. sn:
  62. type: string
  63. required:
  64. - sn
  65. type: object
  66. v1.LoginResp:
  67. properties:
  68. key:
  69. type: string
  70. type: object
  71. v1.LoginResponse:
  72. properties:
  73. code:
  74. default: 0
  75. description: 返回码
  76. format: int
  77. type: integer
  78. data:
  79. $ref: '#/definitions/v1.LoginResp'
  80. type: object
  81. message:
  82. default: success
  83. description: 消息
  84. type: string
  85. type: object
  86. v1.PingBody:
  87. properties:
  88. sn:
  89. type: string
  90. required:
  91. - sn
  92. type: object
  93. v1.PingResponse:
  94. properties:
  95. code:
  96. default: 0
  97. description: 返回码
  98. format: int
  99. type: integer
  100. message:
  101. default: success
  102. description: 消息
  103. type: string
  104. type: object
  105. v1.RegisterBody:
  106. properties:
  107. address:
  108. type: string
  109. age:
  110. type: integer
  111. colture_level_type:
  112. type: integer
  113. corp_code:
  114. type: string
  115. corp_name:
  116. type: string
  117. gender:
  118. type: string
  119. grant_org:
  120. type: string
  121. has_contract:
  122. type: string
  123. head_image:
  124. type: string
  125. id_card_number:
  126. type: string
  127. id_card_type:
  128. type: integer
  129. is_team_leader:
  130. type: string
  131. mobile:
  132. type: string
  133. nation:
  134. type: integer
  135. native_place:
  136. type: string
  137. politics_type:
  138. type: integer
  139. sn:
  140. type: string
  141. team_name:
  142. type: string
  143. team_sys_no:
  144. type: integer
  145. work_name:
  146. type: string
  147. work_no:
  148. type: string
  149. work_type:
  150. type: string
  151. required:
  152. - sn
  153. type: object
  154. v1.RegisterRequest:
  155. properties:
  156. address:
  157. type: string
  158. age:
  159. type: integer
  160. colture_level_type:
  161. type: integer
  162. corp_code:
  163. type: string
  164. corp_name:
  165. type: string
  166. gender:
  167. type: string
  168. grant_org:
  169. type: string
  170. has_contract:
  171. type: string
  172. head_image:
  173. type: string
  174. id_card_number:
  175. type: string
  176. id_card_type:
  177. type: integer
  178. is_team_leader:
  179. type: string
  180. mobile:
  181. type: string
  182. nation:
  183. type: integer
  184. native_place:
  185. type: string
  186. politics_type:
  187. type: integer
  188. sn:
  189. type: string
  190. team_name:
  191. type: string
  192. team_sys_no:
  193. type: integer
  194. work_name:
  195. type: string
  196. work_no:
  197. type: string
  198. work_type:
  199. type: string
  200. required:
  201. - sn
  202. type: object
  203. v1.RegisterResponse:
  204. properties:
  205. code:
  206. default: 0
  207. description: 返回码
  208. format: int
  209. type: integer
  210. message:
  211. default: success
  212. description: 消息
  213. type: string
  214. type: object
  215. v1.StaffDeleteBody:
  216. properties:
  217. sn:
  218. type: string
  219. work_nos:
  220. items:
  221. type: string
  222. type: array
  223. required:
  224. - sn
  225. - work_nos
  226. type: object
  227. v1.StaffDeleteResp:
  228. properties:
  229. work_nos:
  230. items:
  231. type: string
  232. type: array
  233. type: object
  234. v1.StaffUpdateResponse:
  235. properties:
  236. code:
  237. default: 0
  238. description: 返回码
  239. format: int
  240. type: integer
  241. message:
  242. default: success
  243. description: 消息
  244. type: string
  245. type: object
  246. v1.TeamDeleteBody:
  247. properties:
  248. sn:
  249. type: string
  250. team_sys_nos:
  251. items:
  252. type: integer
  253. type: array
  254. type: object
  255. v1.TeamDeleteResponse:
  256. properties:
  257. code:
  258. default: 0
  259. description: 返回码
  260. format: int
  261. type: integer
  262. message:
  263. default: success
  264. description: 消息
  265. type: string
  266. type: object
  267. v1.TeamInfoBody:
  268. properties:
  269. corp_code:
  270. type: string
  271. corp_name:
  272. type: string
  273. remark:
  274. type: string
  275. sn:
  276. type: string
  277. team_leader_name:
  278. type: string
  279. team_leader_phone:
  280. type: string
  281. team_name:
  282. type: string
  283. team_sys_no:
  284. type: integer
  285. type: object
  286. v1.TeamInfoResponse:
  287. properties:
  288. code:
  289. default: 0
  290. description: 返回码
  291. format: int
  292. type: integer
  293. message:
  294. default: success
  295. description: 消息
  296. type: string
  297. type: object
  298. v1.TeamUpdateResponse:
  299. properties:
  300. code:
  301. default: 0
  302. description: 返回码
  303. format: int
  304. type: integer
  305. message:
  306. default: success
  307. description: 消息
  308. type: string
  309. type: object
  310. info:
  311. contact: {}
  312. description: This is a gateway server. On the page, you can go to do testing for every API.
  313. license: {}
  314. title: Project access-control-monitor's APIs
  315. version: "1.1"
  316. paths:
  317. /api/v1/attendance:
  318. put:
  319. consumes:
  320. - application/json
  321. description: 上传考勤数据
  322. parameters:
  323. - description: 上传考勤数据
  324. in: body
  325. name: body
  326. required: true
  327. schema:
  328. $ref: '#/definitions/v1.AttendanceRequest'
  329. produces:
  330. - application/json
  331. responses:
  332. "200":
  333. description: OK
  334. schema:
  335. $ref: '#/definitions/v1.AttendanceResponse'
  336. "500":
  337. description: Internal Server Error
  338. schema:
  339. $ref: '#/definitions/base.HTTPError'
  340. summary: 上传考勤数据
  341. tags:
  342. - user
  343. /api/v1/auth:
  344. put:
  345. consumes:
  346. - application/json
  347. description: 授权获取key
  348. parameters:
  349. - description: 授权信息
  350. in: body
  351. name: body
  352. required: true
  353. schema:
  354. $ref: '#/definitions/v1.LoginBody'
  355. produces:
  356. - application/json
  357. responses:
  358. "200":
  359. description: OK
  360. schema:
  361. $ref: '#/definitions/v1.LoginResponse'
  362. "500":
  363. description: Internal Server Error
  364. schema:
  365. $ref: '#/definitions/base.HTTPError'
  366. summary: 授权获取key
  367. tags:
  368. - user
  369. /api/v1/staff:
  370. post:
  371. consumes:
  372. - application/json
  373. description: 上传员工信息
  374. parameters:
  375. - description: 上传员工信息
  376. in: body
  377. name: body
  378. required: true
  379. schema:
  380. $ref: '#/definitions/v1.RegisterRequest'
  381. produces:
  382. - application/json
  383. responses:
  384. "200":
  385. description: OK
  386. schema:
  387. $ref: '#/definitions/v1.RegisterResponse'
  388. "500":
  389. description: Internal Server Error
  390. schema:
  391. $ref: '#/definitions/base.HTTPError'
  392. summary: 上传员工信息
  393. tags:
  394. - user
  395. put:
  396. consumes:
  397. - application/json
  398. description: 更新员工信息
  399. parameters:
  400. - description: 上传员工信息
  401. in: body
  402. name: body
  403. required: true
  404. schema:
  405. $ref: '#/definitions/v1.RegisterBody'
  406. produces:
  407. - application/json
  408. responses:
  409. "200":
  410. description: OK
  411. schema:
  412. $ref: '#/definitions/v1.StaffUpdateResponse'
  413. "500":
  414. description: Internal Server Error
  415. schema:
  416. $ref: '#/definitions/base.HTTPError'
  417. summary: 更新员工信息
  418. tags:
  419. - user
  420. /api/v1/staff/del:
  421. put:
  422. consumes:
  423. - application/json
  424. description: 删除员工信息
  425. parameters:
  426. - description: 删除人员
  427. in: body
  428. name: body
  429. required: true
  430. schema:
  431. $ref: '#/definitions/v1.StaffDeleteBody'
  432. produces:
  433. - application/json
  434. responses:
  435. "200":
  436. description: OK
  437. schema:
  438. $ref: '#/definitions/v1.StaffDeleteResp'
  439. "500":
  440. description: Internal Server Error
  441. schema:
  442. $ref: '#/definitions/base.HTTPError'
  443. summary: 删除员工信息
  444. tags:
  445. - user
  446. /api/v1/team:
  447. post:
  448. consumes:
  449. - application/json
  450. description: 上传班组信息
  451. parameters:
  452. - description: 上传班组信息
  453. in: body
  454. name: body
  455. required: true
  456. schema:
  457. $ref: '#/definitions/v1.TeamInfoBody'
  458. produces:
  459. - application/json
  460. responses:
  461. "200":
  462. description: OK
  463. schema:
  464. $ref: '#/definitions/v1.TeamInfoResponse'
  465. "500":
  466. description: Internal Server Error
  467. schema:
  468. $ref: '#/definitions/base.HTTPError'
  469. summary: 上传班组信息
  470. tags:
  471. - user
  472. put:
  473. consumes:
  474. - application/json
  475. description: 更新班组信息
  476. parameters:
  477. - description: 班组信息
  478. in: body
  479. name: body
  480. required: true
  481. schema:
  482. $ref: '#/definitions/v1.TeamInfoBody'
  483. produces:
  484. - application/json
  485. responses:
  486. "200":
  487. description: OK
  488. schema:
  489. $ref: '#/definitions/v1.TeamUpdateResponse'
  490. "500":
  491. description: Internal Server Error
  492. schema:
  493. $ref: '#/definitions/base.HTTPError'
  494. summary: 更新班组信息
  495. tags:
  496. - user
  497. /api/v1/team/del:
  498. put:
  499. consumes:
  500. - application/json
  501. description: 删除班组信息
  502. parameters:
  503. - description: ' '
  504. in: body
  505. name: body
  506. required: true
  507. schema:
  508. $ref: '#/definitions/v1.TeamDeleteBody'
  509. produces:
  510. - application/json
  511. responses:
  512. "200":
  513. description: OK
  514. schema:
  515. $ref: '#/definitions/v1.TeamDeleteResponse'
  516. "500":
  517. description: Internal Server Error
  518. schema:
  519. $ref: '#/definitions/base.HTTPError'
  520. summary: 删除班组信息
  521. tags:
  522. - user
  523. /ping:
  524. put:
  525. consumes:
  526. - application/json
  527. description: 心跳
  528. parameters:
  529. - description: sn
  530. in: body
  531. name: body
  532. required: true
  533. schema:
  534. $ref: '#/definitions/v1.PingBody'
  535. produces:
  536. - application/json
  537. responses:
  538. "200":
  539. description: OK
  540. schema:
  541. $ref: '#/definitions/v1.PingResponse'
  542. "500":
  543. description: Internal Server Error
  544. schema:
  545. $ref: '#/definitions/base.HTTPError'
  546. summary: 心跳
  547. tags:
  548. - heatbeat
  549. swagger: "2.0"