schemas.yaml 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461
  1. StringId:
  2. type: string
  3. pattern: '^[0-9]+$'
  4. description: 数据库BIGINT在JSON中的安全十进制字符串表达。
  5. UtcDateTime:
  6. type: string
  7. format: date-time
  8. pattern: 'Z$'
  9. example: '2026-07-23T03:00:00.000Z'
  10. RoleCode:
  11. type: string
  12. enum: [USER, ADMIN]
  13. AllowedModule:
  14. type: string
  15. enum: [DOCUMENT_BROWSER, BACKEND_MANAGEMENT, AUDIT_LOG, ORGANIZATION_USER_MANAGEMENT]
  16. DocumentType:
  17. type: string
  18. enum: [MAIN, SUB_PLAN, ATTACHMENT]
  19. DocumentStatus:
  20. type: string
  21. enum: [DRAFT, PUBLISHED, ARCHIVED]
  22. SecurityLevel:
  23. type: string
  24. enum: [PUBLIC, INTERNAL, SECRET, CONFIDENTIAL, TOP_SECRET]
  25. x-comparison-values:
  26. PUBLIC: 10
  27. INTERNAL: 20
  28. SECRET: 30
  29. CONFIDENTIAL: 40
  30. TOP_SECRET: 50
  31. VisibilityType:
  32. type: string
  33. enum: [ALL_AUTHENTICATED, ORGANIZATION, CUSTOM]
  34. AttachmentType:
  35. type: string
  36. enum: [SUPPORT_ACHIEVEMENT, TRAINING_MATERIAL, TYPICAL_CASE]
  37. SubjectType:
  38. type: string
  39. enum: [ORG, USER]
  40. AllowedAction:
  41. type: string
  42. enum:
  43. - VIEW
  44. - DOWNLOAD
  45. - EDIT
  46. - CONFIG_PERMISSION
  47. - DELETE
  48. - BIND_ATTACHMENT
  49. - UNBIND_ATTACHMENT
  50. CategoryType:
  51. type: string
  52. enum: [SCENE, STYLE, SITUATION, VERSION, OTHER]
  53. EnabledStatus:
  54. type: string
  55. enum: [ENABLED, DISABLED]
  56. AuditResult:
  57. type: string
  58. enum: [SUCCESS, FAILURE]
  59. AuditAction:
  60. type: string
  61. enum:
  62. - LOGIN
  63. - LOGOUT
  64. - VIEW_DOCUMENT
  65. - DOWNLOAD_DOCUMENT
  66. - UPLOAD_DOCUMENT
  67. - BATCH_IMPORT
  68. - EDIT_DOCUMENT
  69. - DELETE_DOCUMENT
  70. - CREATE_CATEGORY
  71. - EDIT_CATEGORY
  72. - DELETE_CATEGORY
  73. - CHANGE_PERMISSION
  74. - BIND_ATTACHMENT
  75. - UNBIND_ATTACHMENT
  76. - RESTORE_DOCUMENT
  77. - CREATE_ORGANIZATION
  78. - EDIT_ORGANIZATION
  79. - DELETE_ORGANIZATION
  80. - CREATE_USER
  81. - EDIT_USER
  82. - DELETE_USER
  83. - RESET_USER_PASSWORD
  84. - DOCUMENT_PASSWORD_SET
  85. - DOCUMENT_PASSWORD_REMOVE
  86. - CREATE_IP_ENTRY
  87. - EDIT_IP_ENTRY
  88. - DELETE_IP_ENTRY
  89. - ASSIGN_ORG_IP
  90. AuditTarget:
  91. type: string
  92. enum:
  93. - AUTH
  94. - CATEGORY
  95. - DOCUMENT
  96. - ATTACHMENT
  97. - PERMISSION
  98. - ATTACHMENT_BINDING
  99. - ORGANIZATION
  100. - USER
  101. - IP_ENTRY
  102. PageResult:
  103. type: object
  104. required: [items, page, pageSize, total, totalPages]
  105. properties:
  106. items:
  107. type: array
  108. items: {}
  109. page:
  110. type: integer
  111. minimum: 1
  112. default: 1
  113. pageSize:
  114. type: integer
  115. minimum: 1
  116. maximum: 100
  117. default: 20
  118. total:
  119. type: integer
  120. minimum: 0
  121. totalPages:
  122. type: integer
  123. minimum: 0
  124. HealthData:
  125. type: object
  126. additionalProperties: false
  127. required: [service, status]
  128. properties:
  129. service:
  130. type: string
  131. enum: [dms]
  132. status:
  133. type: string
  134. enum: [UP]
  135. HealthResponse:
  136. type: object
  137. additionalProperties: false
  138. required: [code, message, data, requestId]
  139. properties:
  140. code:
  141. type: string
  142. enum: [OK]
  143. message:
  144. type: string
  145. enum: [success]
  146. data:
  147. $ref: '#/HealthData'
  148. requestId:
  149. type: string
  150. format: uuid
  151. ErrorResponse:
  152. type: object
  153. additionalProperties: false
  154. required: [code, message, details, requestId]
  155. properties:
  156. code:
  157. type: string
  158. enum:
  159. - INVALID_ARGUMENT
  160. - INVALID_CREDENTIALS
  161. - TOKEN_INVALID
  162. - TOKEN_EXPIRED
  163. - USER_DISABLED
  164. - AUTH_VERSION_MISMATCH
  165. - FORBIDDEN
  166. - SECURITY_LEVEL_FORBIDDEN
  167. - DOCUMENT_VIEW_FORBIDDEN
  168. - DOCUMENT_DOWNLOAD_FORBIDDEN
  169. - RESOURCE_NOT_FOUND
  170. - FILE_NOT_FOUND
  171. - UNSUPPORTED_FILE_TYPE
  172. - PREVIEW_UNAVAILABLE
  173. - PAYLOAD_TOO_LARGE
  174. - BATCH_MANIFEST_MISMATCH
  175. - DATA_VERSION_CONFLICT
  176. - DOCUMENT_NAME_CONFLICT
  177. - CATEGORY_IN_USE
  178. - CATEGORY_NOT_LEAF
  179. - MAIN_PLAN_HAS_CHILDREN
  180. - ATTACHMENT_IN_USE
  181. - ATTACHMENT_HAS_NO_ACL
  182. - SUB_PLAN_PERMISSION_INHERITED
  183. - DUPLICATE_PERMISSION_SUBJECT
  184. - MAIN_PLAN_NOT_FOUND
  185. - INTERNAL_ERROR
  186. - DOCUMENT_NOT_DELETED
  187. - FILE_INTEGRITY_MISMATCH
  188. - FILE_PATH_INVALID
  189. - RESTORE_FILE_CHANGED
  190. - RESTORE_CATEGORY_INVALID
  191. - RESTORE_PARENT_INVALID
  192. - RESTORE_PERMISSION_INVALID
  193. - RESTORE_RELATION_CONFLICT
  194. - ORGANIZATION_IN_USE
  195. - USER_SELF_PROTECTION
  196. - CATEGORY_FLAT_MODE_CONFLICT
  197. - PREVIEW_CONVERTER_UNAVAILABLE
  198. - PREVIEW_CONVERSION_TIMEOUT
  199. - PREVIEW_CONVERSION_FAILED
  200. message:
  201. type: string
  202. details:
  203. type: object
  204. nullable: true
  205. additionalProperties: true
  206. requestId:
  207. type: string
  208. format: uuid
  209. UserSummary:
  210. type: object
  211. additionalProperties: false
  212. required:
  213. - id
  214. - username
  215. - realName
  216. - organizationId
  217. - organizationName
  218. - roleCode
  219. - roleId
  220. - roleName
  221. - securityLevel
  222. - status
  223. - allowedModules
  224. - authVersion
  225. - rowVersion
  226. - lastLoginAt
  227. - lastLoginIp
  228. properties:
  229. id:
  230. $ref: '#/StringId'
  231. username:
  232. type: string
  233. realName:
  234. type: string
  235. organizationId:
  236. allOf:
  237. - $ref: '#/StringId'
  238. nullable: true
  239. organizationName:
  240. type: string
  241. nullable: true
  242. roleCode:
  243. $ref: '#/RoleCode'
  244. roleId:
  245. allOf:
  246. - $ref: '#/StringId'
  247. nullable: true
  248. description: 自定义角色ID;ADMIN恒为空。
  249. roleName:
  250. type: string
  251. nullable: true
  252. description: 自定义角色名称;角色被删除后为null。
  253. securityLevel:
  254. $ref: '#/SecurityLevel'
  255. status:
  256. $ref: '#/EnabledStatus'
  257. allowedModules:
  258. type: array
  259. uniqueItems: true
  260. items:
  261. $ref: '#/AllowedModule'
  262. authVersion:
  263. type: integer
  264. minimum: 0
  265. rowVersion:
  266. type: integer
  267. minimum: 0
  268. lastLoginAt:
  269. allOf:
  270. - $ref: '#/UtcDateTime'
  271. nullable: true
  272. lastLoginIp:
  273. type: string
  274. nullable: true
  275. LoginRequest:
  276. type: object
  277. additionalProperties: false
  278. required: [username, password, keepSignedIn]
  279. properties:
  280. username:
  281. type: string
  282. minLength: 1
  283. password:
  284. type: string
  285. format: password
  286. minLength: 1
  287. writeOnly: true
  288. keepSignedIn:
  289. type: boolean
  290. LoginData:
  291. type: object
  292. additionalProperties: false
  293. required: [accessToken, tokenType, expiresIn, user]
  294. properties:
  295. accessToken:
  296. type: string
  297. tokenType:
  298. type: string
  299. enum: [Bearer]
  300. expiresIn:
  301. type: integer
  302. enum: [7200, 604800]
  303. user:
  304. $ref: '#/UserSummary'
  305. LoginResponse:
  306. type: object
  307. additionalProperties: false
  308. required: [code, message, data, requestId]
  309. properties:
  310. code:
  311. type: string
  312. enum: [OK]
  313. message:
  314. type: string
  315. enum: [success]
  316. data:
  317. $ref: '#/LoginData'
  318. requestId:
  319. type: string
  320. format: uuid
  321. UserResponse:
  322. type: object
  323. additionalProperties: false
  324. required: [code, message, data, requestId]
  325. properties:
  326. code:
  327. type: string
  328. enum: [OK]
  329. message:
  330. type: string
  331. enum: [success]
  332. data:
  333. $ref: '#/UserSummary'
  334. requestId:
  335. type: string
  336. format: uuid
  337. OrganizationNode:
  338. type: object
  339. additionalProperties: false
  340. required: [id, parentId, orgCode, orgName, orgPath, sortNo, status, rowVersion, children]
  341. properties:
  342. id:
  343. $ref: '#/StringId'
  344. parentId:
  345. allOf:
  346. - $ref: '#/StringId'
  347. nullable: true
  348. orgCode:
  349. type: string
  350. orgName:
  351. type: string
  352. orgPath:
  353. type: string
  354. sortNo:
  355. type: integer
  356. status:
  357. $ref: '#/EnabledStatus'
  358. rowVersion:
  359. type: integer
  360. minimum: 0
  361. children:
  362. type: array
  363. items:
  364. $ref: '#/OrganizationNode'
  365. OrganizationTreeResponse:
  366. type: object
  367. additionalProperties: false
  368. required: [code, message, data, requestId]
  369. properties:
  370. code:
  371. type: string
  372. enum: [OK]
  373. message:
  374. type: string
  375. enum: [success]
  376. data:
  377. type: array
  378. items:
  379. $ref: '#/OrganizationNode'
  380. requestId:
  381. type: string
  382. format: uuid
  383. UserPage:
  384. type: object
  385. additionalProperties: false
  386. required: [items, page, pageSize, total, totalPages]
  387. properties:
  388. items:
  389. type: array
  390. items:
  391. $ref: '#/UserSummary'
  392. page:
  393. type: integer
  394. minimum: 1
  395. pageSize:
  396. type: integer
  397. minimum: 1
  398. maximum: 100
  399. total:
  400. type: integer
  401. minimum: 0
  402. totalPages:
  403. type: integer
  404. minimum: 0
  405. UserPageResponse:
  406. type: object
  407. additionalProperties: false
  408. required: [code, message, data, requestId]
  409. properties:
  410. code:
  411. type: string
  412. enum: [OK]
  413. message:
  414. type: string
  415. enum: [success]
  416. data:
  417. $ref: '#/UserPage'
  418. requestId:
  419. type: string
  420. format: uuid
  421. EmptySuccessResponse:
  422. type: object
  423. additionalProperties: false
  424. required: [code, message, data, requestId]
  425. properties:
  426. code:
  427. type: string
  428. enum: [OK]
  429. message:
  430. type: string
  431. enum: [success]
  432. data:
  433. type: object
  434. additionalProperties: false
  435. requestId:
  436. type: string
  437. format: uuid
  438. CategoryNode:
  439. type: object
  440. additionalProperties: false
  441. required:
  442. - id
  443. - categoryCode
  444. - categoryName
  445. - categoryType
  446. - parentId
  447. - categoryPath
  448. - sortNo
  449. - documentCount
  450. - rowVersion
  451. - children
  452. properties:
  453. id:
  454. $ref: '#/StringId'
  455. categoryCode:
  456. type: string
  457. maxLength: 64
  458. categoryName:
  459. type: string
  460. maxLength: 128
  461. categoryType:
  462. $ref: '#/CategoryType'
  463. parentId:
  464. allOf:
  465. - $ref: '#/StringId'
  466. nullable: true
  467. categoryPath:
  468. type: string
  469. maxLength: 1000
  470. sortNo:
  471. type: integer
  472. documentCount:
  473. type: integer
  474. minimum: 0
  475. description: 当前用户可见的、该分类完整有效子树内的MAIN数量。
  476. rowVersion:
  477. type: integer
  478. minimum: 0
  479. children:
  480. type: array
  481. items:
  482. $ref: '#/CategoryNode'
  483. CreateCategoryRequest:
  484. type: object
  485. additionalProperties: false
  486. required: [categoryCode, categoryName, categoryType, parentId, sortNo]
  487. properties:
  488. categoryCode:
  489. type: string
  490. minLength: 1
  491. maxLength: 64
  492. categoryName:
  493. type: string
  494. minLength: 1
  495. maxLength: 128
  496. categoryType:
  497. $ref: '#/CategoryType'
  498. parentId:
  499. allOf:
  500. - $ref: '#/StringId'
  501. nullable: true
  502. sortNo:
  503. type: integer
  504. UpdateCategoryRequest:
  505. type: object
  506. additionalProperties: false
  507. required: [categoryName, categoryType, parentId, sortNo, rowVersion]
  508. properties:
  509. categoryName:
  510. type: string
  511. minLength: 1
  512. maxLength: 128
  513. categoryType:
  514. $ref: '#/CategoryType'
  515. parentId:
  516. allOf:
  517. - $ref: '#/StringId'
  518. nullable: true
  519. sortNo:
  520. type: integer
  521. rowVersion:
  522. type: integer
  523. minimum: 0
  524. CategoryTreeResponse:
  525. type: object
  526. additionalProperties: false
  527. required: [code, message, data, requestId]
  528. properties:
  529. code:
  530. type: string
  531. enum: [OK]
  532. message:
  533. type: string
  534. enum: [success]
  535. data:
  536. type: array
  537. items:
  538. $ref: '#/CategoryNode'
  539. requestId:
  540. type: string
  541. format: uuid
  542. CategoryResponse:
  543. type: object
  544. additionalProperties: false
  545. required: [code, message, data, requestId]
  546. properties:
  547. code:
  548. type: string
  549. enum: [OK]
  550. message:
  551. type: string
  552. enum: [success]
  553. data:
  554. $ref: '#/CategoryNode'
  555. requestId:
  556. type: string
  557. format: uuid
  558. DeleteCategoryData:
  559. type: object
  560. additionalProperties: false
  561. required: [id, deleted]
  562. properties:
  563. id:
  564. $ref: '#/StringId'
  565. deleted:
  566. type: boolean
  567. enum: [true]
  568. DeleteCategoryResponse:
  569. type: object
  570. additionalProperties: false
  571. required: [code, message, data, requestId]
  572. properties:
  573. code:
  574. type: string
  575. enum: [OK]
  576. message:
  577. type: string
  578. enum: [success]
  579. data:
  580. $ref: '#/DeleteCategoryData'
  581. requestId:
  582. type: string
  583. format: uuid
  584. PermissionSummary:
  585. type: object
  586. additionalProperties: false
  587. required: [organizationCount, userCount, inheritedFromMainPlan]
  588. properties:
  589. organizationCount:
  590. type: integer
  591. minimum: 0
  592. userCount:
  593. type: integer
  594. minimum: 0
  595. inheritedFromMainPlan:
  596. type: boolean
  597. DocumentSummary:
  598. type: object
  599. required:
  600. - id
  601. - documentName
  602. - summary
  603. - documentType
  604. - status
  605. - securityLevel
  606. - visibilityType
  607. - visibilitySummary
  608. - categoryId
  609. - categoryName
  610. - categoryPath
  611. - parentDocumentId
  612. - rootDocumentId
  613. - attachmentType
  614. - fileExtension
  615. - tags
  616. - childCount
  617. - attachmentCount
  618. - viewCount
  619. - downloadCount
  620. - createdByName
  621. - createdAt
  622. - updatedAt
  623. - rowVersion
  624. - allowedActions
  625. - hasPassword
  626. - passwordProtectedActions
  627. - viewLocked
  628. properties:
  629. id:
  630. $ref: '#/StringId'
  631. documentName:
  632. type: string
  633. summary:
  634. type: string
  635. nullable: true
  636. description:
  637. type: string
  638. nullable: true
  639. description: 详细说明:管理员在"查看"对话框维护,供普通用户阅读;不参与全文检索。
  640. documentType:
  641. $ref: '#/DocumentType'
  642. status:
  643. $ref: '#/DocumentStatus'
  644. securityLevel:
  645. $ref: '#/SecurityLevel'
  646. visibilityType:
  647. $ref: '#/VisibilityType'
  648. visibilitySummary:
  649. type: string
  650. categoryId:
  651. allOf:
  652. - $ref: '#/StringId'
  653. nullable: true
  654. categoryName:
  655. type: string
  656. nullable: true
  657. categoryPath:
  658. type: string
  659. nullable: true
  660. parentDocumentId:
  661. allOf:
  662. - $ref: '#/StringId'
  663. nullable: true
  664. rootDocumentId:
  665. allOf:
  666. - $ref: '#/StringId'
  667. nullable: true
  668. attachmentType:
  669. allOf:
  670. - $ref: '#/AttachmentType'
  671. nullable: true
  672. fileExtension:
  673. type: string
  674. tags:
  675. type: array
  676. items:
  677. type: string
  678. childCount:
  679. type: integer
  680. minimum: 0
  681. attachmentCount:
  682. type: integer
  683. minimum: 0
  684. viewCount:
  685. type: integer
  686. minimum: 0
  687. downloadCount:
  688. type: integer
  689. minimum: 0
  690. createdByName:
  691. type: string
  692. nullable: true
  693. createdAt:
  694. $ref: '#/UtcDateTime'
  695. updatedAt:
  696. $ref: '#/UtcDateTime'
  697. rowVersion:
  698. type: integer
  699. minimum: 0
  700. allowedActions:
  701. type: array
  702. uniqueItems: true
  703. items:
  704. $ref: '#/AllowedAction'
  705. hasPassword:
  706. type: boolean
  707. description: 主案是否设置密码锁;仅MAIN可设,其余类型恒false。
  708. passwordProtectedActions:
  709. type: array
  710. uniqueItems: true
  711. items:
  712. $ref: '#/DocumentPasswordAction'
  713. description: 密码锁勾选保护的操作码集合;未设密恒为空数组。
  714. viewLocked:
  715. type: boolean
  716. description: 当前用户查看该文档正文是否需要密码;viewLocked时contentSnippet不返回。
  717. mountedPlanCount:
  718. type: integer
  719. minimum: 0
  720. description: 仅共享附件响应返回。
  721. DocumentDetail:
  722. allOf:
  723. - $ref: '#/DocumentSummary'
  724. - type: object
  725. required:
  726. - originalFileName
  727. - mimeType
  728. - fileSize
  729. - fileHash
  730. - permissionSummary
  731. - viewPasswordVerified
  732. - contentText
  733. properties:
  734. originalFileName:
  735. type: string
  736. mimeType:
  737. type: string
  738. nullable: true
  739. fileSize:
  740. type: integer
  741. minimum: 0
  742. fileHash:
  743. type: string
  744. pattern: '^[0-9a-fA-F]{64}$'
  745. permissionSummary:
  746. $ref: '#/PermissionSummary'
  747. viewPasswordVerified:
  748. type: boolean
  749. description: 查看是否已通过密码验证(未锁定恒true)。
  750. contentText:
  751. type: string
  752. nullable: true
  753. description: 提取的正文文本;viewLocked且请求头密码未验证通过时为null。
  754. AttachmentBindingSummary:
  755. allOf:
  756. - $ref: '#/DocumentSummary'
  757. - type: object
  758. required: [bindingId, bindingSortNo, mountedPlanCount]
  759. properties:
  760. bindingId:
  761. $ref: '#/StringId'
  762. bindingSortNo:
  763. type: integer
  764. mountedPlanCount:
  765. type: integer
  766. minimum: 0
  767. DocumentPage:
  768. type: object
  769. additionalProperties: false
  770. required: [items, page, pageSize, total, totalPages]
  771. properties:
  772. items:
  773. type: array
  774. items:
  775. $ref: '#/DocumentSummary'
  776. page:
  777. type: integer
  778. minimum: 1
  779. pageSize:
  780. type: integer
  781. minimum: 1
  782. maximum: 100
  783. total:
  784. type: integer
  785. minimum: 0
  786. totalPages:
  787. type: integer
  788. minimum: 0
  789. AttachmentBindingPage:
  790. type: object
  791. additionalProperties: false
  792. required: [items, page, pageSize, total, totalPages]
  793. properties:
  794. items:
  795. type: array
  796. items:
  797. $ref: '#/AttachmentBindingSummary'
  798. page:
  799. type: integer
  800. minimum: 1
  801. pageSize:
  802. type: integer
  803. minimum: 1
  804. maximum: 100
  805. total:
  806. type: integer
  807. minimum: 0
  808. totalPages:
  809. type: integer
  810. minimum: 0
  811. MainPlanBrief:
  812. type: object
  813. additionalProperties: false
  814. required: [id, documentName, categoryName, securityLevel]
  815. properties:
  816. id:
  817. $ref: '#/StringId'
  818. documentName:
  819. type: string
  820. categoryName:
  821. type: string
  822. nullable: true
  823. securityLevel:
  824. $ref: '#/SecurityLevel'
  825. MainPlanBriefCollection:
  826. type: object
  827. additionalProperties: false
  828. required: [items, total]
  829. properties:
  830. items:
  831. type: array
  832. items:
  833. $ref: '#/MainPlanBrief'
  834. total:
  835. type: integer
  836. minimum: 0
  837. DocumentPageResponse:
  838. type: object
  839. additionalProperties: false
  840. required: [code, message, data, requestId]
  841. properties:
  842. code:
  843. type: string
  844. enum: [OK]
  845. message:
  846. type: string
  847. enum: [success]
  848. data:
  849. $ref: '#/DocumentPage'
  850. requestId:
  851. type: string
  852. format: uuid
  853. DocumentDetailResponse:
  854. type: object
  855. additionalProperties: false
  856. required: [code, message, data, requestId]
  857. properties:
  858. code:
  859. type: string
  860. enum: [OK]
  861. message:
  862. type: string
  863. enum: [success]
  864. data:
  865. $ref: '#/DocumentDetail'
  866. requestId:
  867. type: string
  868. format: uuid
  869. AttachmentBindingPageResponse:
  870. type: object
  871. additionalProperties: false
  872. required: [code, message, data, requestId]
  873. properties:
  874. code:
  875. type: string
  876. enum: [OK]
  877. message:
  878. type: string
  879. enum: [success]
  880. data:
  881. $ref: '#/AttachmentBindingPage'
  882. requestId:
  883. type: string
  884. format: uuid
  885. MainPlanBriefCollectionResponse:
  886. type: object
  887. additionalProperties: false
  888. required: [code, message, data, requestId]
  889. properties:
  890. code:
  891. type: string
  892. enum: [OK]
  893. message:
  894. type: string
  895. enum: [success]
  896. data:
  897. $ref: '#/MainPlanBriefCollection'
  898. requestId:
  899. type: string
  900. format: uuid
  901. MainDocumentCreateMetadata:
  902. type: object
  903. additionalProperties: false
  904. required: [documentName, documentType, summary, categoryId, securityLevel, tags]
  905. properties:
  906. documentName: {type: string, minLength: 1, maxLength: 255}
  907. documentType: {type: string, enum: [MAIN]}
  908. summary: {type: string, nullable: true}
  909. categoryId: {$ref: '#/StringId'}
  910. securityLevel: {$ref: '#/SecurityLevel'}
  911. overwriteDocumentId:
  912. allOf: [{$ref: '#/StringId'}]
  913. description: 仅在用户确认覆盖同名主案后提交,并必须与rowVersion同时出现。
  914. rowVersion:
  915. type: integer
  916. minimum: 0
  917. description: 被覆盖文档的当前版本;仅与overwriteDocumentId同时提交。
  918. tags:
  919. type: array
  920. maxItems: 50
  921. items: {type: string, minLength: 1, maxLength: 64}
  922. password:
  923. type: string
  924. minLength: 1
  925. maxLength: 128
  926. description: 可选;仅新增MAIN时允许,与protectedActions必须同时出现;覆盖上传(overwriteDocumentId)时禁止携带。
  927. protectedActions:
  928. type: array
  929. uniqueItems: true
  930. items: {$ref: '#/DocumentPasswordAction'}
  931. description: 可选;密码保护的操作码集合,与password必须同时出现。
  932. SubPlanCreateMetadata:
  933. type: object
  934. additionalProperties: false
  935. required: [documentName, documentType, summary, parentDocumentId, securityLevel, tags]
  936. properties:
  937. documentName: {type: string, minLength: 1, maxLength: 255}
  938. documentType: {type: string, enum: [SUB_PLAN]}
  939. summary: {type: string, nullable: true}
  940. parentDocumentId: {$ref: '#/StringId'}
  941. securityLevel: {$ref: '#/SecurityLevel'}
  942. overwriteDocumentId:
  943. allOf: [{$ref: '#/StringId'}]
  944. description: 仅在用户确认覆盖同一主案下同名子案后提交,并必须与rowVersion同时出现。
  945. rowVersion:
  946. type: integer
  947. minimum: 0
  948. description: 被覆盖文档的当前版本;仅与overwriteDocumentId同时提交。
  949. tags:
  950. type: array
  951. maxItems: 50
  952. items: {type: string, minLength: 1, maxLength: 64}
  953. DocumentCreateMetadata:
  954. oneOf:
  955. - $ref: '#/MainDocumentCreateMetadata'
  956. - $ref: '#/SubPlanCreateMetadata'
  957. discriminator:
  958. propertyName: documentType
  959. AttachmentCreateMetadata:
  960. type: object
  961. additionalProperties: false
  962. required: [documentName, attachmentType, summary, tags]
  963. properties:
  964. documentName: {type: string, minLength: 1, maxLength: 255}
  965. attachmentType: {$ref: '#/AttachmentType'}
  966. summary: {type: string, nullable: true}
  967. tags:
  968. type: array
  969. maxItems: 50
  970. items: {type: string, minLength: 1, maxLength: 64}
  971. MainDocumentUpdateRequest:
  972. type: object
  973. additionalProperties: false
  974. required: [documentName, summary, categoryId, securityLevel, tags, rowVersion]
  975. properties:
  976. documentName: {type: string, minLength: 1, maxLength: 255}
  977. summary: {type: string, nullable: true}
  978. categoryId: {$ref: '#/StringId'}
  979. securityLevel: {$ref: '#/SecurityLevel'}
  980. tags:
  981. type: array
  982. maxItems: 50
  983. items: {type: string, minLength: 1, maxLength: 64}
  984. rowVersion: {type: integer, minimum: 0}
  985. SubPlanUpdateRequest:
  986. type: object
  987. additionalProperties: false
  988. required: [documentName, summary, securityLevel, tags, rowVersion]
  989. properties:
  990. documentName: {type: string, minLength: 1, maxLength: 255}
  991. summary: {type: string, nullable: true}
  992. securityLevel: {$ref: '#/SecurityLevel'}
  993. tags:
  994. type: array
  995. maxItems: 50
  996. items: {type: string, minLength: 1, maxLength: 64}
  997. rowVersion: {type: integer, minimum: 0}
  998. UpdateDocumentRequest:
  999. oneOf:
  1000. - $ref: '#/MainDocumentUpdateRequest'
  1001. - $ref: '#/SubPlanUpdateRequest'
  1002. UpdateDocumentDescriptionRequest:
  1003. type: object
  1004. additionalProperties: false
  1005. required: [description]
  1006. properties:
  1007. description: {type: string, nullable: true, maxLength: 20000}
  1008. DocumentPasswordAction:
  1009. type: string
  1010. description: 主案密码锁可保护的操作码(与权限矩阵7操作对齐)。
  1011. enum:
  1012. - VIEW
  1013. - DOWNLOAD
  1014. - EDIT
  1015. - DELETE
  1016. - CONFIG_PERMISSION
  1017. - BIND_ATTACHMENT
  1018. - UNBIND_ATTACHMENT
  1019. UpdateDocumentPasswordRequest:
  1020. type: object
  1021. additionalProperties: false
  1022. required: [rowVersion]
  1023. properties:
  1024. rowVersion: {type: integer, minimum: 0, description: 主案当前版本,乐观锁。}
  1025. oldPassword:
  1026. type: string
  1027. maxLength: 128
  1028. description: 已设密时修改/清除必须提供且正确;未设密时禁止提供。
  1029. password:
  1030. type: string
  1031. minLength: 1
  1032. maxLength: 128
  1033. description: 新密码;缺省或空表示清除密码锁,此时不得携带protectedActions。
  1034. protectedActions:
  1035. type: array
  1036. uniqueItems: true
  1037. items: {$ref: '#/DocumentPasswordAction'}
  1038. description: 设置/修改密码时的保护操作集合;与password必须同时出现。
  1039. DocumentPasswordSummary:
  1040. type: object
  1041. additionalProperties: false
  1042. required: [id, hasPassword, protectedActions, rowVersion]
  1043. properties:
  1044. id: {$ref: '#/StringId'}
  1045. hasPassword: {type: boolean}
  1046. protectedActions:
  1047. type: array
  1048. uniqueItems: true
  1049. items: {$ref: '#/DocumentPasswordAction'}
  1050. rowVersion: {type: integer, minimum: 0}
  1051. DocumentPasswordResponse:
  1052. type: object
  1053. additionalProperties: false
  1054. required: [code, message, data, requestId]
  1055. properties:
  1056. code:
  1057. type: string
  1058. enum: [OK]
  1059. message:
  1060. type: string
  1061. enum: [success]
  1062. data:
  1063. $ref: '#/DocumentPasswordSummary'
  1064. requestId:
  1065. type: string
  1066. format: uuid
  1067. UpdateAttachmentRequest:
  1068. type: object
  1069. additionalProperties: false
  1070. required: [documentName, attachmentType, summary, tags, rowVersion]
  1071. properties:
  1072. documentName: {type: string, minLength: 1, maxLength: 255}
  1073. attachmentType: {$ref: '#/AttachmentType'}
  1074. summary: {type: string, nullable: true}
  1075. tags:
  1076. type: array
  1077. maxItems: 50
  1078. items: {type: string, minLength: 1, maxLength: 64}
  1079. rowVersion: {type: integer, minimum: 0}
  1080. DeleteDocumentData:
  1081. type: object
  1082. additionalProperties: false
  1083. required: [id, deleted]
  1084. properties:
  1085. id: {$ref: '#/StringId'}
  1086. deleted: {type: boolean, enum: [true]}
  1087. DeleteDocumentResponse:
  1088. type: object
  1089. additionalProperties: false
  1090. required: [code, message, data, requestId]
  1091. properties:
  1092. code: {type: string, enum: [OK]}
  1093. message: {type: string, enum: [success]}
  1094. data: {$ref: '#/DeleteDocumentData'}
  1095. requestId: {type: string, format: uuid}
  1096. BatchImportMultipart:
  1097. type: object
  1098. additionalProperties: false
  1099. required: [files, items]
  1100. properties:
  1101. files:
  1102. type: array
  1103. minItems: 1
  1104. items: {type: string, format: binary}
  1105. description: 重复files字段,顺序与items数组严格对应。
  1106. items:
  1107. type: string
  1108. description: 文档或附件metadata对象数组的JSON字符串。
  1109. BatchImportItem:
  1110. type: object
  1111. additionalProperties: false
  1112. required: [index, originalFileName, success]
  1113. properties:
  1114. index: {type: integer, minimum: 0}
  1115. originalFileName: {type: string}
  1116. success: {type: boolean}
  1117. document: {$ref: '#/DocumentDetail'}
  1118. errorCode: {type: string}
  1119. errorMessage: {type: string}
  1120. BatchImportData:
  1121. type: object
  1122. additionalProperties: false
  1123. required: [total, successCount, failureCount, items]
  1124. properties:
  1125. total: {type: integer, minimum: 0}
  1126. successCount: {type: integer, minimum: 0}
  1127. failureCount: {type: integer, minimum: 0}
  1128. items:
  1129. type: array
  1130. items: {$ref: '#/BatchImportItem'}
  1131. BatchImportResponse:
  1132. type: object
  1133. additionalProperties: false
  1134. required: [code, message, data, requestId]
  1135. properties:
  1136. code: {type: string, enum: [OK]}
  1137. message: {type: string, enum: [success]}
  1138. data: {$ref: '#/BatchImportData'}
  1139. requestId: {type: string, format: uuid}
  1140. BindAttachmentsRequest:
  1141. type: object
  1142. additionalProperties: false
  1143. required: [attachmentIds, mainPlanRowVersion]
  1144. properties:
  1145. attachmentIds:
  1146. type: array
  1147. minItems: 1
  1148. items: {$ref: '#/StringId'}
  1149. mainPlanRowVersion:
  1150. type: integer
  1151. minimum: 0
  1152. BindAttachmentsData:
  1153. type: object
  1154. additionalProperties: false
  1155. required: [createdCount, existingCount, attachmentCount, mainPlanRowVersion]
  1156. properties:
  1157. createdCount: {type: integer, minimum: 0}
  1158. existingCount: {type: integer, minimum: 0}
  1159. attachmentCount: {type: integer, minimum: 0}
  1160. mainPlanRowVersion: {type: integer, minimum: 0}
  1161. BindAttachmentsResponse:
  1162. type: object
  1163. additionalProperties: false
  1164. required: [code, message, data, requestId]
  1165. properties:
  1166. code: {type: string, enum: [OK]}
  1167. message: {type: string, enum: [success]}
  1168. data: {$ref: '#/BindAttachmentsData'}
  1169. requestId: {type: string, format: uuid}
  1170. UnbindAttachmentData:
  1171. type: object
  1172. additionalProperties: false
  1173. required: [attachmentCount, mainPlanRowVersion]
  1174. properties:
  1175. attachmentCount: {type: integer, minimum: 0}
  1176. mainPlanRowVersion: {type: integer, minimum: 0}
  1177. UnbindAttachmentResponse:
  1178. type: object
  1179. additionalProperties: false
  1180. required: [code, message, data, requestId]
  1181. properties:
  1182. code: {type: string, enum: [OK]}
  1183. message: {type: string, enum: [success]}
  1184. data: {$ref: '#/UnbindAttachmentData'}
  1185. requestId: {type: string, format: uuid}
  1186. ReorderDocumentsRequest:
  1187. type: object
  1188. additionalProperties: false
  1189. required: [orderedIds]
  1190. properties:
  1191. orderedIds:
  1192. type: array
  1193. minItems: 2
  1194. items: {$ref: '#/StringId'}
  1195. ReorderDocumentsData:
  1196. type: object
  1197. additionalProperties: false
  1198. required: [reorderedCount]
  1199. properties:
  1200. reorderedCount: {type: integer, minimum: 0}
  1201. ReorderDocumentsResponse:
  1202. type: object
  1203. additionalProperties: false
  1204. required: [code, message, data, requestId]
  1205. properties:
  1206. code: {type: string, enum: [OK]}
  1207. message: {type: string, enum: [success]}
  1208. data: {$ref: '#/ReorderDocumentsData'}
  1209. requestId: {type: string, format: uuid}
  1210. ReorderAttachmentsRequest:
  1211. type: object
  1212. additionalProperties: false
  1213. required: [orderedBindingIds, mainPlanRowVersion]
  1214. properties:
  1215. orderedBindingIds:
  1216. type: array
  1217. minItems: 2
  1218. items: {$ref: '#/StringId'}
  1219. mainPlanRowVersion:
  1220. type: integer
  1221. minimum: 0
  1222. ReorderAttachmentsData:
  1223. type: object
  1224. additionalProperties: false
  1225. required: [reorderedCount, mainPlanRowVersion]
  1226. properties:
  1227. reorderedCount: {type: integer, minimum: 0}
  1228. mainPlanRowVersion: {type: integer, minimum: 0}
  1229. ReorderAttachmentsResponse:
  1230. type: object
  1231. additionalProperties: false
  1232. required: [code, message, data, requestId]
  1233. properties:
  1234. code: {type: string, enum: [OK]}
  1235. message: {type: string, enum: [success]}
  1236. data: {$ref: '#/ReorderAttachmentsData'}
  1237. requestId: {type: string, format: uuid}
  1238. ReorderCategoriesRequest:
  1239. type: object
  1240. additionalProperties: false
  1241. required: [parentId, orderedIds]
  1242. properties:
  1243. parentId:
  1244. oneOf:
  1245. - $ref: '#/StringId'
  1246. - type: 'null'
  1247. orderedIds:
  1248. type: array
  1249. minItems: 2
  1250. items: {$ref: '#/StringId'}
  1251. ReorderCategoriesData:
  1252. type: object
  1253. additionalProperties: false
  1254. required: [reorderedCount]
  1255. properties:
  1256. reorderedCount: {type: integer, minimum: 0}
  1257. ReorderCategoriesResponse:
  1258. type: object
  1259. additionalProperties: false
  1260. required: [code, message, data, requestId]
  1261. properties:
  1262. code: {type: string, enum: [OK]}
  1263. message: {type: string, enum: [success]}
  1264. data: {$ref: '#/ReorderCategoriesData'}
  1265. requestId: {type: string, format: uuid}
  1266. PermissionEntry:
  1267. type: object
  1268. additionalProperties: false
  1269. required:
  1270. - id
  1271. - subjectType
  1272. - subjectId
  1273. - subjectName
  1274. - canView
  1275. - canDownload
  1276. - canEdit
  1277. - canManagePermission
  1278. - canDelete
  1279. properties:
  1280. id: {$ref: '#/StringId'}
  1281. subjectType: {$ref: '#/SubjectType'}
  1282. subjectId: {$ref: '#/StringId'}
  1283. subjectName: {type: string}
  1284. canView: {type: boolean}
  1285. canDownload: {type: boolean}
  1286. canEdit: {type: boolean}
  1287. canManagePermission: {type: boolean}
  1288. canDelete: {type: boolean}
  1289. SavePermissionEntry:
  1290. type: object
  1291. additionalProperties: false
  1292. required:
  1293. - subjectType
  1294. - subjectId
  1295. - canView
  1296. - canDownload
  1297. - canEdit
  1298. - canManagePermission
  1299. - canDelete
  1300. properties:
  1301. subjectType: {$ref: '#/SubjectType'}
  1302. subjectId: {$ref: '#/StringId'}
  1303. canView: {type: boolean}
  1304. canDownload: {type: boolean}
  1305. canEdit: {type: boolean}
  1306. canManagePermission: {type: boolean}
  1307. canDelete: {type: boolean}
  1308. SavePermissionsRequest:
  1309. type: object
  1310. additionalProperties: false
  1311. required: [visibilityType, documentRowVersion, entries]
  1312. properties:
  1313. visibilityType: {$ref: '#/VisibilityType'}
  1314. documentRowVersion: {type: integer, minimum: 0}
  1315. entries:
  1316. type: array
  1317. items: {$ref: '#/SavePermissionEntry'}
  1318. description: ALL_AUTHENTICATED必须为空;ORGANIZATION至少一个ORG;CUSTOM可为空。
  1319. PermissionDetail:
  1320. type: object
  1321. additionalProperties: false
  1322. required:
  1323. - documentId
  1324. - sourceDocumentId
  1325. - inherited
  1326. - visibilityType
  1327. - documentRowVersion
  1328. - entries
  1329. properties:
  1330. documentId: {$ref: '#/StringId'}
  1331. sourceDocumentId: {$ref: '#/StringId'}
  1332. inherited: {type: boolean}
  1333. visibilityType: {$ref: '#/VisibilityType'}
  1334. documentRowVersion: {type: integer, minimum: 0}
  1335. entries:
  1336. type: array
  1337. items: {$ref: '#/PermissionEntry'}
  1338. PermissionDetailResponse:
  1339. type: object
  1340. additionalProperties: false
  1341. required: [code, message, data, requestId]
  1342. properties:
  1343. code: {type: string, enum: [OK]}
  1344. message: {type: string, enum: [success]}
  1345. data: {$ref: '#/PermissionDetail'}
  1346. requestId: {type: string, format: uuid}
  1347. AuditGranularity:
  1348. type: string
  1349. enum: [DAY, WEEK, MONTH]
  1350. AuditLogSummary:
  1351. type: object
  1352. additionalProperties: false
  1353. required:
  1354. - id
  1355. - username
  1356. - realName
  1357. - organizationName
  1358. - actionType
  1359. - targetType
  1360. - targetId
  1361. - targetName
  1362. - operationResult
  1363. - failureReason
  1364. - clientIp
  1365. - requestId
  1366. - createdAt
  1367. properties:
  1368. id: {$ref: '#/StringId'}
  1369. username: {type: string, nullable: true}
  1370. realName: {type: string, nullable: true}
  1371. organizationName: {type: string, nullable: true}
  1372. actionType: {$ref: '#/AuditAction'}
  1373. targetType:
  1374. allOf: [{$ref: '#/AuditTarget'}]
  1375. nullable: true
  1376. targetId:
  1377. allOf: [{$ref: '#/StringId'}]
  1378. nullable: true
  1379. targetName: {type: string, nullable: true}
  1380. operationResult: {$ref: '#/AuditResult'}
  1381. failureReason: {type: string, nullable: true}
  1382. clientIp: {type: string, nullable: true}
  1383. requestId: {type: string, nullable: true}
  1384. createdAt: {$ref: '#/UtcDateTime'}
  1385. AuditLogPage:
  1386. type: object
  1387. additionalProperties: false
  1388. required: [items, page, pageSize, total, totalPages]
  1389. properties:
  1390. items: {type: array, items: {$ref: '#/AuditLogSummary'}}
  1391. page: {type: integer, minimum: 1}
  1392. pageSize: {type: integer, minimum: 1, maximum: 100}
  1393. total: {type: integer, minimum: 0}
  1394. totalPages: {type: integer, minimum: 0}
  1395. AuditLogPageResponse:
  1396. type: object
  1397. additionalProperties: false
  1398. required: [code, message, data, requestId]
  1399. properties:
  1400. code: {type: string, enum: [OK]}
  1401. message: {type: string, enum: [success]}
  1402. data: {$ref: '#/AuditLogPage'}
  1403. requestId: {type: string, format: uuid}
  1404. DocumentStatistics:
  1405. type: object
  1406. additionalProperties: false
  1407. required: [planDocumentCount, mainPlanCount, subPlanCount, attachmentCount, todayViewerCount]
  1408. properties:
  1409. planDocumentCount: {type: integer, minimum: 0}
  1410. mainPlanCount: {type: integer, minimum: 0}
  1411. subPlanCount: {type: integer, minimum: 0}
  1412. attachmentCount: {type: integer, minimum: 0}
  1413. todayViewerCount: {type: integer, minimum: 0}
  1414. DocumentStatisticsResponse:
  1415. type: object
  1416. additionalProperties: false
  1417. required: [code, message, data, requestId]
  1418. properties:
  1419. code: {type: string, enum: [OK]}
  1420. message: {type: string, enum: [success]}
  1421. data: {$ref: '#/DocumentStatistics'}
  1422. requestId: {type: string, format: uuid}
  1423. AuditTrendItem:
  1424. type: object
  1425. additionalProperties: false
  1426. required: [period, operationCount]
  1427. properties:
  1428. period: {type: string}
  1429. operationCount: {type: integer, minimum: 0}
  1430. AuditTrendData:
  1431. type: object
  1432. additionalProperties: false
  1433. required: [items]
  1434. properties:
  1435. items: {type: array, items: {$ref: '#/AuditTrendItem'}}
  1436. AuditTrendResponse:
  1437. type: object
  1438. additionalProperties: false
  1439. required: [code, message, data, requestId]
  1440. properties:
  1441. code: {type: string, enum: [OK]}
  1442. message: {type: string, enum: [success]}
  1443. data: {$ref: '#/AuditTrendData'}
  1444. requestId: {type: string, format: uuid}
  1445. AuditActionStatisticsItem:
  1446. type: object
  1447. additionalProperties: false
  1448. required: [actionType, count]
  1449. properties:
  1450. actionType: {$ref: '#/AuditAction'}
  1451. count: {type: integer, minimum: 0}
  1452. AuditActionStatisticsData:
  1453. type: object
  1454. additionalProperties: false
  1455. required: [items]
  1456. properties:
  1457. items: {type: array, items: {$ref: '#/AuditActionStatisticsItem'}}
  1458. AuditActionStatisticsResponse:
  1459. type: object
  1460. additionalProperties: false
  1461. required: [code, message, data, requestId]
  1462. properties:
  1463. code: {type: string, enum: [OK]}
  1464. message: {type: string, enum: [success]}
  1465. data: {$ref: '#/AuditActionStatisticsData'}
  1466. requestId: {type: string, format: uuid}
  1467. AuditUserStatisticsItem:
  1468. type: object
  1469. additionalProperties: false
  1470. required: [userId, realName, organizationName, operationCount]
  1471. properties:
  1472. userId: {$ref: '#/StringId'}
  1473. realName: {type: string, nullable: true}
  1474. organizationName: {type: string, nullable: true}
  1475. operationCount: {type: integer, minimum: 0}
  1476. AuditUserStatisticsData:
  1477. type: object
  1478. additionalProperties: false
  1479. required: [items]
  1480. properties:
  1481. items: {type: array, items: {$ref: '#/AuditUserStatisticsItem'}}
  1482. AuditUserStatisticsResponse:
  1483. type: object
  1484. additionalProperties: false
  1485. required: [code, message, data, requestId]
  1486. properties:
  1487. code: {type: string, enum: [OK]}
  1488. message: {type: string, enum: [success]}
  1489. data: {$ref: '#/AuditUserStatisticsData'}
  1490. requestId: {type: string, format: uuid}
  1491. DeletedBySnapshot:
  1492. type: object
  1493. additionalProperties: false
  1494. required: [userId, username, realName, organizationName]
  1495. properties:
  1496. userId:
  1497. allOf:
  1498. - $ref: '#/StringId'
  1499. nullable: true
  1500. username: {type: string, nullable: true}
  1501. realName: {type: string, nullable: true}
  1502. organizationName: {type: string, nullable: true}
  1503. RecycleBinDocumentSummary:
  1504. type: object
  1505. additionalProperties: false
  1506. required:
  1507. - id
  1508. - documentName
  1509. - documentType
  1510. - originalFileName
  1511. - categoryId
  1512. - categoryName
  1513. - parentDocumentId
  1514. - securityLevel
  1515. - documentStatus
  1516. - deletedAt
  1517. - updatedBy
  1518. - updatedByName
  1519. - deletedBy
  1520. - rowVersion
  1521. properties:
  1522. id: {$ref: '#/StringId'}
  1523. documentName: {type: string}
  1524. documentType: {$ref: '#/DocumentType'}
  1525. originalFileName: {type: string}
  1526. categoryId:
  1527. allOf:
  1528. - $ref: '#/StringId'
  1529. nullable: true
  1530. categoryName: {type: string, nullable: true}
  1531. parentDocumentId:
  1532. allOf:
  1533. - $ref: '#/StringId'
  1534. nullable: true
  1535. securityLevel: {$ref: '#/SecurityLevel'}
  1536. documentStatus: {$ref: '#/DocumentStatus'}
  1537. deletedAt: {$ref: '#/UtcDateTime'}
  1538. updatedBy:
  1539. allOf:
  1540. - $ref: '#/StringId'
  1541. nullable: true
  1542. updatedByName: {type: string, nullable: true}
  1543. deletedBy:
  1544. allOf:
  1545. - $ref: '#/DeletedBySnapshot'
  1546. nullable: true
  1547. rowVersion: {type: integer, minimum: 0}
  1548. RecycleBinDocumentPage:
  1549. type: object
  1550. additionalProperties: false
  1551. required: [items, page, pageSize, total, totalPages]
  1552. properties:
  1553. items:
  1554. type: array
  1555. items: {$ref: '#/RecycleBinDocumentSummary'}
  1556. page: {type: integer, minimum: 1}
  1557. pageSize: {type: integer, minimum: 1, maximum: 100}
  1558. total: {type: integer, minimum: 0}
  1559. totalPages: {type: integer, minimum: 0}
  1560. RecycleBinDocumentPageResponse:
  1561. type: object
  1562. additionalProperties: false
  1563. required: [code, message, data, requestId]
  1564. properties:
  1565. code: {type: string, enum: [OK]}
  1566. message: {type: string, enum: [success]}
  1567. data: {$ref: '#/RecycleBinDocumentPage'}
  1568. requestId: {type: string, format: uuid}
  1569. RestoreDocumentRequest:
  1570. type: object
  1571. additionalProperties: false
  1572. required: [rowVersion]
  1573. properties:
  1574. rowVersion: {type: integer, minimum: 0}
  1575. RestoredDocument:
  1576. allOf:
  1577. - $ref: '#/DocumentSummary'
  1578. - type: object
  1579. required: [originalFileName, mimeType, fileSize, permissionSummary]
  1580. properties:
  1581. originalFileName: {type: string}
  1582. mimeType: {type: string, nullable: true}
  1583. fileSize: {type: integer, minimum: 0}
  1584. permissionSummary: {$ref: '#/PermissionSummary'}
  1585. mountedPlanCount: {type: integer, minimum: 0}
  1586. RestoreDocumentResult:
  1587. type: object
  1588. additionalProperties: false
  1589. required:
  1590. - document
  1591. - restoredPermissionCount
  1592. - skippedPermissionCount
  1593. - restoredBindingCount
  1594. - skippedBindingCount
  1595. properties:
  1596. document: {$ref: '#/RestoredDocument'}
  1597. restoredPermissionCount: {type: integer, minimum: 0}
  1598. skippedPermissionCount: {type: integer, minimum: 0}
  1599. restoredBindingCount: {type: integer, minimum: 0}
  1600. skippedBindingCount: {type: integer, minimum: 0}
  1601. RestoreDocumentResponse:
  1602. type: object
  1603. additionalProperties: false
  1604. required: [code, message, data, requestId]
  1605. properties:
  1606. code: {type: string, enum: [OK]}
  1607. message: {type: string, enum: [success]}
  1608. data: {$ref: '#/RestoreDocumentResult'}
  1609. requestId: {type: string, format: uuid}
  1610. DictionaryOption:
  1611. type: object
  1612. additionalProperties: false
  1613. required: [code, label, sortNo]
  1614. properties:
  1615. code: {type: string, minLength: 1}
  1616. label: {type: string, minLength: 1}
  1617. sortNo: {type: integer, minimum: 0}
  1618. DictionaryOptionList:
  1619. type: array
  1620. items: {$ref: '#/DictionaryOption'}
  1621. UiDictionaryGroups:
  1622. type: object
  1623. additionalProperties: false
  1624. required:
  1625. - roleCodes
  1626. - allowedModules
  1627. - documentTypes
  1628. - documentStatuses
  1629. - securityLevels
  1630. - visibilityTypes
  1631. - attachmentTypes
  1632. - subjectTypes
  1633. - deptScopes
  1634. - allowedActions
  1635. - categoryTypes
  1636. - enabledStatuses
  1637. - auditResults
  1638. - auditActions
  1639. - auditTargets
  1640. properties:
  1641. roleCodes: {$ref: '#/DictionaryOptionList'}
  1642. allowedModules: {$ref: '#/DictionaryOptionList'}
  1643. documentTypes: {$ref: '#/DictionaryOptionList'}
  1644. documentStatuses: {$ref: '#/DictionaryOptionList'}
  1645. securityLevels: {$ref: '#/DictionaryOptionList'}
  1646. visibilityTypes: {$ref: '#/DictionaryOptionList'}
  1647. attachmentTypes: {$ref: '#/DictionaryOptionList'}
  1648. subjectTypes: {$ref: '#/DictionaryOptionList'}
  1649. deptScopes: {$ref: '#/DictionaryOptionList'}
  1650. allowedActions: {$ref: '#/DictionaryOptionList'}
  1651. categoryTypes: {$ref: '#/DictionaryOptionList'}
  1652. enabledStatuses: {$ref: '#/DictionaryOptionList'}
  1653. auditResults: {$ref: '#/DictionaryOptionList'}
  1654. auditActions: {$ref: '#/DictionaryOptionList'}
  1655. auditTargets: {$ref: '#/DictionaryOptionList'}
  1656. UiDictionaries:
  1657. type: object
  1658. additionalProperties: false
  1659. required: [version, locale, dictionaries]
  1660. properties:
  1661. version:
  1662. type: string
  1663. pattern: '^[0-9]{4}\.[0-9]+$'
  1664. example: '2026.1'
  1665. locale:
  1666. type: string
  1667. example: zh-CN
  1668. dictionaries: {$ref: '#/UiDictionaryGroups'}
  1669. UiDictionariesResponse:
  1670. type: object
  1671. additionalProperties: false
  1672. required: [code, message, data, requestId]
  1673. properties:
  1674. code: {type: string, enum: [OK]}
  1675. message: {type: string, enum: [success]}
  1676. data: {$ref: '#/UiDictionaries'}
  1677. requestId: {type: string, format: uuid}
  1678. CreateOrganizationRequest:
  1679. type: object
  1680. additionalProperties: false
  1681. required: [orgCode, orgName, parentId, sortNo, status]
  1682. properties:
  1683. orgCode: {type: string, minLength: 1, maxLength: 64}
  1684. orgName: {type: string, minLength: 1, maxLength: 128}
  1685. parentId:
  1686. allOf: [{$ref: '#/StringId'}]
  1687. nullable: true
  1688. sortNo: {type: integer}
  1689. status: {$ref: '#/EnabledStatus'}
  1690. UpdateOrganizationRequest:
  1691. type: object
  1692. additionalProperties: false
  1693. required: [orgName, parentId, sortNo, status, rowVersion]
  1694. properties:
  1695. orgName: {type: string, minLength: 1, maxLength: 128}
  1696. parentId:
  1697. allOf: [{$ref: '#/StringId'}]
  1698. nullable: true
  1699. sortNo: {type: integer}
  1700. status: {$ref: '#/EnabledStatus'}
  1701. rowVersion: {type: integer, minimum: 0}
  1702. OrganizationResponse:
  1703. type: object
  1704. additionalProperties: false
  1705. required: [code, message, data, requestId]
  1706. properties:
  1707. code: {type: string, enum: [OK]}
  1708. message: {type: string, enum: [success]}
  1709. data:
  1710. allOf: [{$ref: '#/OrganizationNode'}]
  1711. description: 写操作响应中children固定为空数组。
  1712. requestId: {type: string, format: uuid}
  1713. DeleteOrganizationData:
  1714. type: object
  1715. additionalProperties: false
  1716. required: [id, deleted]
  1717. properties:
  1718. id: {$ref: '#/StringId'}
  1719. deleted: {type: boolean, enum: [true]}
  1720. DeleteOrganizationResponse:
  1721. type: object
  1722. additionalProperties: false
  1723. required: [code, message, data, requestId]
  1724. properties:
  1725. code: {type: string, enum: [OK]}
  1726. message: {type: string, enum: [success]}
  1727. data: {$ref: '#/DeleteOrganizationData'}
  1728. requestId: {type: string, format: uuid}
  1729. CreateUserRequest:
  1730. type: object
  1731. additionalProperties: false
  1732. required: [username, realName, initialPassword, organizationId, roleCode, roleId, securityLevel, status]
  1733. properties:
  1734. username: {type: string, minLength: 1, maxLength: 64}
  1735. realName: {type: string, minLength: 1, maxLength: 64}
  1736. initialPassword: {type: string, format: password, minLength: 8, maxLength: 64, writeOnly: true}
  1737. organizationId:
  1738. allOf: [{$ref: '#/StringId'}]
  1739. nullable: true
  1740. roleCode: {$ref: '#/RoleCode'}
  1741. roleId:
  1742. allOf: [{$ref: '#/StringId'}]
  1743. nullable: true
  1744. securityLevel: {$ref: '#/SecurityLevel'}
  1745. status: {$ref: '#/EnabledStatus'}
  1746. UpdateUserRequest:
  1747. type: object
  1748. additionalProperties: false
  1749. required: [realName, organizationId, roleCode, roleId, securityLevel, status, rowVersion]
  1750. properties:
  1751. realName: {type: string, minLength: 1, maxLength: 64}
  1752. organizationId:
  1753. allOf: [{$ref: '#/StringId'}]
  1754. nullable: true
  1755. roleCode: {$ref: '#/RoleCode'}
  1756. roleId:
  1757. allOf: [{$ref: '#/StringId'}]
  1758. nullable: true
  1759. securityLevel: {$ref: '#/SecurityLevel'}
  1760. status: {$ref: '#/EnabledStatus'}
  1761. rowVersion: {type: integer, minimum: 0}
  1762. DeleteUserData:
  1763. type: object
  1764. additionalProperties: false
  1765. required: [id, deleted]
  1766. properties:
  1767. id: {$ref: '#/StringId'}
  1768. deleted: {type: boolean, enum: [true]}
  1769. DeleteUserResponse:
  1770. type: object
  1771. additionalProperties: false
  1772. required: [code, message, data, requestId]
  1773. properties:
  1774. code: {type: string, enum: [OK]}
  1775. message: {type: string, enum: [success]}
  1776. data: {$ref: '#/DeleteUserData'}
  1777. requestId: {type: string, format: uuid}
  1778. ResetUserPasswordRequest:
  1779. type: object
  1780. additionalProperties: false
  1781. required: [newPassword, rowVersion]
  1782. properties:
  1783. newPassword: {type: string, format: password, minLength: 8, maxLength: 64, writeOnly: true}
  1784. rowVersion: {type: integer, minimum: 0}
  1785. ResetPasswordData:
  1786. type: object
  1787. additionalProperties: false
  1788. required: [id, reset, authVersion]
  1789. properties:
  1790. id: {$ref: '#/StringId'}
  1791. reset: {type: boolean, enum: [true]}
  1792. authVersion: {type: integer, minimum: 0}
  1793. ResetPasswordResponse:
  1794. type: object
  1795. additionalProperties: false
  1796. required: [code, message, data, requestId]
  1797. properties:
  1798. code: {type: string, enum: [OK]}
  1799. message: {type: string, enum: [success]}
  1800. data: {$ref: '#/ResetPasswordData'}
  1801. requestId: {type: string, format: uuid}
  1802. DocumentTagCollection:
  1803. type: object
  1804. additionalProperties: false
  1805. required: [items, total]
  1806. properties:
  1807. items:
  1808. type: array
  1809. items: {type: string}
  1810. description: 当前用户可见的主案标签,按Unicode升序。
  1811. total: {type: integer, minimum: 0}
  1812. DocumentTagsResponse:
  1813. type: object
  1814. additionalProperties: false
  1815. required: [code, message, data, requestId]
  1816. properties:
  1817. code: {type: string, enum: [OK]}
  1818. message: {type: string, enum: [success]}
  1819. data: {$ref: '#/DocumentTagCollection'}
  1820. requestId: {type: string, format: uuid}
  1821. RuntimeConfigData:
  1822. type: object
  1823. additionalProperties: false
  1824. required: [pdfViewerEngine]
  1825. properties:
  1826. pdfViewerEngine:
  1827. type: string
  1828. enum: [iframe, pdfjs]
  1829. description: 后端PDF预览引擎策略,由.env决定。
  1830. RuntimeConfigResponse:
  1831. type: object
  1832. additionalProperties: false
  1833. required: [code, message, data, requestId]
  1834. properties:
  1835. code: {type: string, enum: [OK]}
  1836. message: {type: string, enum: [success]}
  1837. data: {$ref: '#/RuntimeConfigData'}
  1838. requestId: {type: string, format: uuid}
  1839. DeptScope:
  1840. type: string
  1841. description: 权限矩阵部门范围:所属部门方案/可访问部门方案/其他部门方案。
  1842. enum: [OWN, ASSIGNED, OTHER]
  1843. RoleSummary:
  1844. type: object
  1845. additionalProperties: false
  1846. required: [id, roleName, sortNo, status, remark, isDefault, memberCount, rowVersion]
  1847. properties:
  1848. id: {$ref: '#/StringId'}
  1849. roleName: {type: string, maxLength: 64}
  1850. sortNo: {type: integer, minimum: 0, maximum: 999999}
  1851. status: {$ref: '#/EnabledStatus'}
  1852. remark:
  1853. type: string
  1854. nullable: true
  1855. maxLength: 255
  1856. isDefault: {type: boolean}
  1857. memberCount: {type: integer, minimum: 0}
  1858. rowVersion: {type: integer, minimum: 0}
  1859. RolePage:
  1860. type: object
  1861. additionalProperties: false
  1862. required: [items, page, pageSize, total, totalPages]
  1863. properties:
  1864. items:
  1865. type: array
  1866. items:
  1867. $ref: '#/RoleSummary'
  1868. page:
  1869. type: integer
  1870. minimum: 1
  1871. pageSize:
  1872. type: integer
  1873. minimum: 1
  1874. maximum: 100
  1875. total:
  1876. type: integer
  1877. minimum: 0
  1878. totalPages:
  1879. type: integer
  1880. minimum: 0
  1881. RolePageResponse:
  1882. type: object
  1883. additionalProperties: false
  1884. required: [code, message, data, requestId]
  1885. properties:
  1886. code: {type: string, enum: [OK]}
  1887. message: {type: string, enum: [success]}
  1888. data: {$ref: '#/RolePage'}
  1889. requestId: {type: string, format: uuid}
  1890. CreateRoleRequest:
  1891. type: object
  1892. additionalProperties: false
  1893. required: [roleName, sortNo, status, remark, isDefault]
  1894. properties:
  1895. roleName: {type: string, minLength: 1, maxLength: 64}
  1896. sortNo: {type: integer, minimum: 0, maximum: 999999}
  1897. status: {$ref: '#/EnabledStatus'}
  1898. remark:
  1899. type: string
  1900. nullable: true
  1901. maxLength: 255
  1902. isDefault: {type: boolean}
  1903. UpdateRoleRequest:
  1904. type: object
  1905. additionalProperties: false
  1906. required: [roleName, sortNo, status, remark, isDefault, rowVersion]
  1907. properties:
  1908. roleName: {type: string, minLength: 1, maxLength: 64}
  1909. sortNo: {type: integer, minimum: 0, maximum: 999999}
  1910. status: {$ref: '#/EnabledStatus'}
  1911. remark:
  1912. type: string
  1913. nullable: true
  1914. maxLength: 255
  1915. isDefault: {type: boolean}
  1916. rowVersion: {type: integer, minimum: 0}
  1917. RoleResponse:
  1918. type: object
  1919. additionalProperties: false
  1920. required: [code, message, data, requestId]
  1921. properties:
  1922. code: {type: string, enum: [OK]}
  1923. message: {type: string, enum: [success]}
  1924. data: {$ref: '#/RoleSummary'}
  1925. requestId: {type: string, format: uuid}
  1926. DeleteRoleData:
  1927. type: object
  1928. additionalProperties: false
  1929. required: [id, deleted]
  1930. properties:
  1931. id: {$ref: '#/StringId'}
  1932. deleted: {type: boolean, enum: [true]}
  1933. DeleteRoleResponse:
  1934. type: object
  1935. additionalProperties: false
  1936. required: [code, message, data, requestId]
  1937. properties:
  1938. code: {type: string, enum: [OK]}
  1939. message: {type: string, enum: [success]}
  1940. data: {$ref: '#/DeleteRoleData'}
  1941. requestId: {type: string, format: uuid}
  1942. RoleDepartmentListResponse:
  1943. type: object
  1944. additionalProperties: false
  1945. required: [code, message, data, requestId]
  1946. properties:
  1947. code: {type: string, enum: [OK]}
  1948. message: {type: string, enum: [success]}
  1949. data:
  1950. type: array
  1951. items:
  1952. $ref: '#/StringId'
  1953. requestId: {type: string, format: uuid}
  1954. UpdateRoleDepartmentsRequest:
  1955. type: object
  1956. additionalProperties: false
  1957. required: [organizationIds, rowVersion]
  1958. properties:
  1959. organizationIds:
  1960. type: array
  1961. items: {$ref: '#/StringId'}
  1962. uniqueItems: true
  1963. rowVersion: {type: integer, minimum: 0}
  1964. RoleDepartmentsData:
  1965. type: object
  1966. additionalProperties: false
  1967. required: [id, organizationIds, rowVersion]
  1968. properties:
  1969. id: {$ref: '#/StringId'}
  1970. organizationIds:
  1971. type: array
  1972. items: {$ref: '#/StringId'}
  1973. uniqueItems: true
  1974. rowVersion: {type: integer, minimum: 0}
  1975. RoleDepartmentsResponse:
  1976. type: object
  1977. additionalProperties: false
  1978. required: [code, message, data, requestId]
  1979. properties:
  1980. code: {type: string, enum: [OK]}
  1981. message: {type: string, enum: [success]}
  1982. data: {$ref: '#/RoleDepartmentsData'}
  1983. requestId: {type: string, format: uuid}
  1984. RolePermissionRow:
  1985. type: object
  1986. additionalProperties: false
  1987. required: [securityLevel, deptScope, canView, canDownload, canEdit, canDelete, canConfigPermission, canBindAttachment, canUnbindAttachment]
  1988. properties:
  1989. securityLevel: {$ref: '#/SecurityLevel'}
  1990. deptScope: {$ref: '#/DeptScope'}
  1991. canView: {type: boolean}
  1992. canDownload: {type: boolean}
  1993. canEdit: {type: boolean}
  1994. canDelete: {type: boolean}
  1995. canConfigPermission: {type: boolean}
  1996. canBindAttachment: {type: boolean}
  1997. canUnbindAttachment: {type: boolean}
  1998. RoleMatrixListResponse:
  1999. type: object
  2000. additionalProperties: false
  2001. required: [code, message, data, requestId]
  2002. properties:
  2003. code: {type: string, enum: [OK]}
  2004. message: {type: string, enum: [success]}
  2005. data:
  2006. type: array
  2007. minItems: 15
  2008. maxItems: 15
  2009. items:
  2010. $ref: '#/RolePermissionRow'
  2011. requestId: {type: string, format: uuid}
  2012. UpdateRolePermissionsRequest:
  2013. type: object
  2014. additionalProperties: false
  2015. required: [matrix, rowVersion]
  2016. properties:
  2017. matrix:
  2018. type: array
  2019. minItems: 15
  2020. maxItems: 15
  2021. items:
  2022. $ref: '#/RolePermissionRow'
  2023. rowVersion: {type: integer, minimum: 0}
  2024. RolePermissionsData:
  2025. type: object
  2026. additionalProperties: false
  2027. required: [id, matrix, rowVersion]
  2028. properties:
  2029. id: {$ref: '#/StringId'}
  2030. matrix:
  2031. type: array
  2032. minItems: 15
  2033. maxItems: 15
  2034. items:
  2035. $ref: '#/RolePermissionRow'
  2036. rowVersion: {type: integer, minimum: 0}
  2037. RolePermissionsResponse:
  2038. type: object
  2039. additionalProperties: false
  2040. required: [code, message, data, requestId]
  2041. properties:
  2042. code: {type: string, enum: [OK]}
  2043. message: {type: string, enum: [success]}
  2044. data: {$ref: '#/RolePermissionsData'}
  2045. requestId: {type: string, format: uuid}
  2046. RoleUsersData:
  2047. type: object
  2048. additionalProperties: false
  2049. required: [id, userIds]
  2050. properties:
  2051. id: {$ref: '#/StringId'}
  2052. userIds:
  2053. type: array
  2054. items: {$ref: '#/StringId'}
  2055. uniqueItems: true
  2056. rowVersion: {type: integer, minimum: 0}
  2057. RoleUsersResponse:
  2058. type: object
  2059. additionalProperties: false
  2060. required: [code, message, data, requestId]
  2061. properties:
  2062. code: {type: string, enum: [OK]}
  2063. message: {type: string, enum: [success]}
  2064. data: {$ref: '#/RoleUsersData'}
  2065. requestId: {type: string, format: uuid}
  2066. UpdateRoleUsersRequest:
  2067. type: object
  2068. additionalProperties: false
  2069. required: [userIds, rowVersion]
  2070. properties:
  2071. userIds:
  2072. type: array
  2073. items: {$ref: '#/StringId'}
  2074. uniqueItems: true
  2075. rowVersion: {type: integer, minimum: 0}
  2076. DocumentRelationPreset:
  2077. type: object
  2078. additionalProperties: false
  2079. required: [code, label, sortNo]
  2080. properties:
  2081. code: {type: string, minLength: 1, description: 预置类型稳定编码(仅用于前端下拉匹配,不落库)}
  2082. label: {type: string, minLength: 1, description: 预置关系文本(保存时直接写入relation_type)}
  2083. sortNo: {type: integer, minimum: 0}
  2084. DocumentRelationPresetsResponse:
  2085. type: object
  2086. additionalProperties: false
  2087. required: [code, message, data, requestId]
  2088. properties:
  2089. code: {type: string, enum: [OK]}
  2090. message: {type: string, enum: [success]}
  2091. data:
  2092. type: object
  2093. additionalProperties: false
  2094. required: [presets]
  2095. properties:
  2096. presets:
  2097. type: array
  2098. items: {$ref: '#/DocumentRelationPreset'}
  2099. requestId: {type: string, format: uuid}
  2100. DocumentRelationItem:
  2101. type: object
  2102. additionalProperties: false
  2103. required: [relatedDocumentId, relatedDocumentName, relationType]
  2104. properties:
  2105. relatedDocumentId: {$ref: '#/StringId'}
  2106. relatedDocumentName: {type: string, minLength: 1}
  2107. relationType: {type: string, minLength: 1, maxLength: 64, description: 关系文本(预置label或用户自定义)}
  2108. DocumentRelationsResponse:
  2109. type: object
  2110. additionalProperties: false
  2111. required: [code, message, data, requestId]
  2112. properties:
  2113. code: {type: string, enum: [OK]}
  2114. message: {type: string, enum: [success]}
  2115. data:
  2116. type: object
  2117. additionalProperties: false
  2118. required: [items]
  2119. properties:
  2120. items:
  2121. type: array
  2122. items: {$ref: '#/DocumentRelationItem'}
  2123. requestId: {type: string, format: uuid}
  2124. UpdateDocumentRelationsRequest:
  2125. type: object
  2126. additionalProperties: false
  2127. required: [relations, rowVersion]
  2128. properties:
  2129. relations:
  2130. type: array
  2131. maxItems: 50
  2132. items:
  2133. type: object
  2134. additionalProperties: false
  2135. required: [relatedDocumentId, relationType]
  2136. properties:
  2137. relatedDocumentId: {$ref: '#/StringId'}
  2138. relationType: {type: string, minLength: 1, maxLength: 64}
  2139. uniqueItems: true
  2140. rowVersion: {type: integer, minimum: 0}
  2141. DocumentRelationsSaveResponse:
  2142. type: object
  2143. additionalProperties: false
  2144. required: [code, message, data, requestId]
  2145. properties:
  2146. code: {type: string, enum: [OK]}
  2147. message: {type: string, enum: [success]}
  2148. data:
  2149. type: object
  2150. additionalProperties: false
  2151. required: [relations, rowVersion]
  2152. properties:
  2153. relations:
  2154. type: array
  2155. items: {$ref: '#/DocumentRelationItem'}
  2156. rowVersion: {type: integer, minimum: 0}
  2157. requestId: {type: string, format: uuid}
  2158. IpEntrySummary:
  2159. type: object
  2160. additionalProperties: false
  2161. required: [id, ipValue, remark, rowVersion]
  2162. properties:
  2163. id: {$ref: '#/StringId'}
  2164. ipValue:
  2165. type: string
  2166. minLength: 1
  2167. maxLength: 64
  2168. description: 规范化后的精确IP或CIDR网段文本(IPv6为压缩形式,网段主机位为0)。
  2169. remark:
  2170. type: string
  2171. maxLength: 128
  2172. rowVersion: {type: integer, minimum: 0}
  2173. IpEntryPage:
  2174. type: object
  2175. additionalProperties: false
  2176. required: [items, page, pageSize, total, totalPages]
  2177. properties:
  2178. items:
  2179. type: array
  2180. items:
  2181. $ref: '#/IpEntrySummary'
  2182. page:
  2183. type: integer
  2184. minimum: 1
  2185. pageSize:
  2186. type: integer
  2187. minimum: 1
  2188. maximum: 100
  2189. total:
  2190. type: integer
  2191. minimum: 0
  2192. totalPages:
  2193. type: integer
  2194. minimum: 0
  2195. IpEntryPageResponse:
  2196. type: object
  2197. additionalProperties: false
  2198. required: [code, message, data, requestId]
  2199. properties:
  2200. code: {type: string, enum: [OK]}
  2201. message: {type: string, enum: [success]}
  2202. data: {$ref: '#/IpEntryPage'}
  2203. requestId: {type: string, format: uuid}
  2204. CreateIpEntryRequest:
  2205. type: object
  2206. additionalProperties: false
  2207. required: [ipValue, remark]
  2208. properties:
  2209. ipValue: {type: string, minLength: 1, maxLength: 64}
  2210. remark: {type: string, maxLength: 128}
  2211. UpdateIpEntryRequest:
  2212. type: object
  2213. additionalProperties: false
  2214. required: [ipValue, remark, rowVersion]
  2215. properties:
  2216. ipValue: {type: string, minLength: 1, maxLength: 64}
  2217. remark: {type: string, maxLength: 128}
  2218. rowVersion: {type: integer, minimum: 0}
  2219. IpEntryResponse:
  2220. type: object
  2221. additionalProperties: false
  2222. required: [code, message, data, requestId]
  2223. properties:
  2224. code: {type: string, enum: [OK]}
  2225. message: {type: string, enum: [success]}
  2226. data: {$ref: '#/IpEntrySummary'}
  2227. requestId: {type: string, format: uuid}
  2228. DeleteIpEntryData:
  2229. type: object
  2230. additionalProperties: false
  2231. required: [id, deleted]
  2232. properties:
  2233. id: {$ref: '#/StringId'}
  2234. deleted: {type: boolean, enum: [true]}
  2235. DeleteIpEntryResponse:
  2236. type: object
  2237. additionalProperties: false
  2238. required: [code, message, data, requestId]
  2239. properties:
  2240. code: {type: string, enum: [OK]}
  2241. message: {type: string, enum: [success]}
  2242. data: {$ref: '#/DeleteIpEntryData'}
  2243. requestId: {type: string, format: uuid}
  2244. OrgIpAssignmentListData:
  2245. type: object
  2246. additionalProperties: false
  2247. required: [ipEntryIds]
  2248. properties:
  2249. ipEntryIds:
  2250. type: array
  2251. items: {$ref: '#/StringId'}
  2252. uniqueItems: true
  2253. OrgIpAssignmentListResponse:
  2254. type: object
  2255. additionalProperties: false
  2256. required: [code, message, data, requestId]
  2257. properties:
  2258. code: {type: string, enum: [OK]}
  2259. message: {type: string, enum: [success]}
  2260. data: {$ref: '#/OrgIpAssignmentListData'}
  2261. requestId: {type: string, format: uuid}
  2262. UpdateOrgIpAssignmentsRequest:
  2263. type: object
  2264. additionalProperties: false
  2265. required: [ipEntryIds, rowVersion]
  2266. properties:
  2267. ipEntryIds:
  2268. type: array
  2269. items: {$ref: '#/StringId'}
  2270. uniqueItems: true
  2271. rowVersion: {type: integer, minimum: 0}
  2272. OrgIpAssignmentsData:
  2273. type: object
  2274. additionalProperties: false
  2275. required: [id, ipEntryIds, rowVersion]
  2276. properties:
  2277. id: {$ref: '#/StringId'}
  2278. ipEntryIds:
  2279. type: array
  2280. items: {$ref: '#/StringId'}
  2281. uniqueItems: true
  2282. rowVersion: {type: integer, minimum: 0}
  2283. OrgIpAssignmentsResponse:
  2284. type: object
  2285. additionalProperties: false
  2286. required: [code, message, data, requestId]
  2287. properties:
  2288. code: {type: string, enum: [OK]}
  2289. message: {type: string, enum: [success]}
  2290. data: {$ref: '#/OrgIpAssignmentsData'}
  2291. requestId: {type: string, format: uuid}