schemas.yaml 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440
  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. contentExtractStatus:
  755. type: string
  756. enum: [SUCCESS, EMPTY, UNSUPPORTED, FAILED]
  757. description: 正文提取状态。仅管理员详情响应返回。
  758. contentExtractError:
  759. type: string
  760. nullable: true
  761. description: 提取失败的脱敏原因(异常类型+首行信息,不含绝对路径)。仅管理员详情响应返回;非FAILED时为null。
  762. contentExtractedAt:
  763. type: string
  764. format: date-time
  765. nullable: true
  766. description: 最近一次正文提取时间(UTC)。仅管理员详情响应返回。
  767. AttachmentBindingSummary:
  768. allOf:
  769. - $ref: '#/DocumentSummary'
  770. - type: object
  771. required: [bindingId, bindingSortNo, mountedPlanCount]
  772. properties:
  773. bindingId:
  774. $ref: '#/StringId'
  775. bindingSortNo:
  776. type: integer
  777. mountedPlanCount:
  778. type: integer
  779. minimum: 0
  780. DocumentPage:
  781. type: object
  782. additionalProperties: false
  783. required: [items, page, pageSize, total, totalPages]
  784. properties:
  785. items:
  786. type: array
  787. items:
  788. $ref: '#/DocumentSummary'
  789. page:
  790. type: integer
  791. minimum: 1
  792. pageSize:
  793. type: integer
  794. minimum: 1
  795. maximum: 100
  796. total:
  797. type: integer
  798. minimum: 0
  799. totalPages:
  800. type: integer
  801. minimum: 0
  802. AttachmentBindingPage:
  803. type: object
  804. additionalProperties: false
  805. required: [items, page, pageSize, total, totalPages]
  806. properties:
  807. items:
  808. type: array
  809. items:
  810. $ref: '#/AttachmentBindingSummary'
  811. page:
  812. type: integer
  813. minimum: 1
  814. pageSize:
  815. type: integer
  816. minimum: 1
  817. maximum: 100
  818. total:
  819. type: integer
  820. minimum: 0
  821. totalPages:
  822. type: integer
  823. minimum: 0
  824. MainPlanBrief:
  825. type: object
  826. additionalProperties: false
  827. required: [id, documentName, categoryName, securityLevel]
  828. properties:
  829. id:
  830. $ref: '#/StringId'
  831. documentName:
  832. type: string
  833. categoryName:
  834. type: string
  835. nullable: true
  836. securityLevel:
  837. $ref: '#/SecurityLevel'
  838. MainPlanBriefCollection:
  839. type: object
  840. additionalProperties: false
  841. required: [items, total]
  842. properties:
  843. items:
  844. type: array
  845. items:
  846. $ref: '#/MainPlanBrief'
  847. total:
  848. type: integer
  849. minimum: 0
  850. DocumentPageResponse:
  851. type: object
  852. additionalProperties: false
  853. required: [code, message, data, requestId]
  854. properties:
  855. code:
  856. type: string
  857. enum: [OK]
  858. message:
  859. type: string
  860. enum: [success]
  861. data:
  862. $ref: '#/DocumentPage'
  863. requestId:
  864. type: string
  865. format: uuid
  866. DocumentDetailResponse:
  867. type: object
  868. additionalProperties: false
  869. required: [code, message, data, requestId]
  870. properties:
  871. code:
  872. type: string
  873. enum: [OK]
  874. message:
  875. type: string
  876. enum: [success]
  877. data:
  878. $ref: '#/DocumentDetail'
  879. requestId:
  880. type: string
  881. format: uuid
  882. AttachmentBindingPageResponse:
  883. type: object
  884. additionalProperties: false
  885. required: [code, message, data, requestId]
  886. properties:
  887. code:
  888. type: string
  889. enum: [OK]
  890. message:
  891. type: string
  892. enum: [success]
  893. data:
  894. $ref: '#/AttachmentBindingPage'
  895. requestId:
  896. type: string
  897. format: uuid
  898. MainPlanBriefCollectionResponse:
  899. type: object
  900. additionalProperties: false
  901. required: [code, message, data, requestId]
  902. properties:
  903. code:
  904. type: string
  905. enum: [OK]
  906. message:
  907. type: string
  908. enum: [success]
  909. data:
  910. $ref: '#/MainPlanBriefCollection'
  911. requestId:
  912. type: string
  913. format: uuid
  914. MainDocumentCreateMetadata:
  915. type: object
  916. additionalProperties: false
  917. required: [documentName, documentType, summary, categoryId, securityLevel, tags]
  918. properties:
  919. documentName: {type: string, minLength: 1, maxLength: 255}
  920. documentType: {type: string, enum: [MAIN]}
  921. summary: {type: string, nullable: true}
  922. categoryId: {$ref: '#/StringId'}
  923. securityLevel: {$ref: '#/SecurityLevel'}
  924. overwriteDocumentId:
  925. allOf: [{$ref: '#/StringId'}]
  926. description: 仅在用户确认覆盖同名主案后提交,并必须与rowVersion同时出现。
  927. rowVersion:
  928. type: integer
  929. minimum: 0
  930. description: 被覆盖文档的当前版本;仅与overwriteDocumentId同时提交。
  931. tags:
  932. type: array
  933. maxItems: 50
  934. items: {type: string, minLength: 1, maxLength: 64}
  935. password:
  936. type: string
  937. minLength: 1
  938. maxLength: 128
  939. description: 可选;仅新增MAIN时允许,与protectedActions必须同时出现;覆盖上传(overwriteDocumentId)时禁止携带。
  940. protectedActions:
  941. type: array
  942. uniqueItems: true
  943. items: {$ref: '#/DocumentPasswordAction'}
  944. description: 可选;密码保护的操作码集合,与password必须同时出现。
  945. SubPlanCreateMetadata:
  946. type: object
  947. additionalProperties: false
  948. required: [documentName, documentType, summary, parentDocumentId, securityLevel, tags]
  949. properties:
  950. documentName: {type: string, minLength: 1, maxLength: 255}
  951. documentType: {type: string, enum: [SUB_PLAN]}
  952. summary: {type: string, nullable: true}
  953. parentDocumentId: {$ref: '#/StringId'}
  954. securityLevel: {$ref: '#/SecurityLevel'}
  955. overwriteDocumentId:
  956. allOf: [{$ref: '#/StringId'}]
  957. description: 仅在用户确认覆盖同一主案下同名子案后提交,并必须与rowVersion同时出现。
  958. rowVersion:
  959. type: integer
  960. minimum: 0
  961. description: 被覆盖文档的当前版本;仅与overwriteDocumentId同时提交。
  962. tags:
  963. type: array
  964. maxItems: 50
  965. items: {type: string, minLength: 1, maxLength: 64}
  966. DocumentCreateMetadata:
  967. oneOf:
  968. - $ref: '#/MainDocumentCreateMetadata'
  969. - $ref: '#/SubPlanCreateMetadata'
  970. discriminator:
  971. propertyName: documentType
  972. AttachmentCreateMetadata:
  973. type: object
  974. additionalProperties: false
  975. required: [documentName, attachmentType, summary, tags]
  976. properties:
  977. documentName: {type: string, minLength: 1, maxLength: 255}
  978. attachmentType: {$ref: '#/AttachmentType'}
  979. summary: {type: string, nullable: true}
  980. tags:
  981. type: array
  982. maxItems: 50
  983. items: {type: string, minLength: 1, maxLength: 64}
  984. MainDocumentUpdateRequest:
  985. type: object
  986. additionalProperties: false
  987. required: [documentName, summary, categoryId, securityLevel, tags, rowVersion]
  988. properties:
  989. documentName: {type: string, minLength: 1, maxLength: 255}
  990. summary: {type: string, nullable: true}
  991. categoryId: {$ref: '#/StringId'}
  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. organizationId:
  999. allOf:
  1000. - $ref: '#/StringId'
  1001. description: 目标归属部门;缺省沿用现有归属,调整到其他部门仅ADMIN。
  1002. SubPlanUpdateRequest:
  1003. type: object
  1004. additionalProperties: false
  1005. required: [documentName, summary, securityLevel, tags, rowVersion]
  1006. properties:
  1007. documentName: {type: string, minLength: 1, maxLength: 255}
  1008. summary: {type: string, nullable: true}
  1009. securityLevel: {$ref: '#/SecurityLevel'}
  1010. tags:
  1011. type: array
  1012. maxItems: 50
  1013. items: {type: string, minLength: 1, maxLength: 64}
  1014. rowVersion: {type: integer, minimum: 0}
  1015. organizationId:
  1016. allOf:
  1017. - $ref: '#/StringId'
  1018. description: 目标归属部门;缺省沿用现有归属,调整到其他部门仅ADMIN。
  1019. UpdateDocumentRequest:
  1020. oneOf:
  1021. - $ref: '#/MainDocumentUpdateRequest'
  1022. - $ref: '#/SubPlanUpdateRequest'
  1023. UpdateDocumentDescriptionRequest:
  1024. type: object
  1025. additionalProperties: false
  1026. required: [description]
  1027. properties:
  1028. description: {type: string, nullable: true, maxLength: 20000}
  1029. DocumentPasswordAction:
  1030. type: string
  1031. description: 主案密码锁可保护的操作码(与权限矩阵7操作对齐)。
  1032. enum:
  1033. - VIEW
  1034. - DOWNLOAD
  1035. - EDIT
  1036. - DELETE
  1037. - CONFIG_PERMISSION
  1038. - BIND_ATTACHMENT
  1039. - UNBIND_ATTACHMENT
  1040. UpdateDocumentPasswordRequest:
  1041. type: object
  1042. additionalProperties: false
  1043. required: [rowVersion]
  1044. properties:
  1045. rowVersion: {type: integer, minimum: 0, description: 主案当前版本,乐观锁。}
  1046. oldPassword:
  1047. type: string
  1048. maxLength: 128
  1049. description: 已设密时修改/清除必须提供且正确;未设密时禁止提供。
  1050. password:
  1051. type: string
  1052. minLength: 1
  1053. maxLength: 128
  1054. description: 新密码;缺省或空表示清除密码锁,此时不得携带protectedActions。
  1055. protectedActions:
  1056. type: array
  1057. uniqueItems: true
  1058. items: {$ref: '#/DocumentPasswordAction'}
  1059. description: 设置/修改密码时的保护操作集合;与password必须同时出现。
  1060. DocumentPasswordSummary:
  1061. type: object
  1062. additionalProperties: false
  1063. required: [id, hasPassword, protectedActions, rowVersion]
  1064. properties:
  1065. id: {$ref: '#/StringId'}
  1066. hasPassword: {type: boolean}
  1067. protectedActions:
  1068. type: array
  1069. uniqueItems: true
  1070. items: {$ref: '#/DocumentPasswordAction'}
  1071. rowVersion: {type: integer, minimum: 0}
  1072. DocumentPasswordResponse:
  1073. type: object
  1074. additionalProperties: false
  1075. required: [code, message, data, requestId]
  1076. properties:
  1077. code:
  1078. type: string
  1079. enum: [OK]
  1080. message:
  1081. type: string
  1082. enum: [success]
  1083. data:
  1084. $ref: '#/DocumentPasswordSummary'
  1085. requestId:
  1086. type: string
  1087. format: uuid
  1088. UpdateAttachmentRequest:
  1089. type: object
  1090. additionalProperties: false
  1091. required: [documentName, attachmentType, summary, tags, rowVersion]
  1092. properties:
  1093. documentName: {type: string, minLength: 1, maxLength: 255}
  1094. attachmentType: {$ref: '#/AttachmentType'}
  1095. summary: {type: string, nullable: true}
  1096. tags:
  1097. type: array
  1098. maxItems: 50
  1099. items: {type: string, minLength: 1, maxLength: 64}
  1100. rowVersion: {type: integer, minimum: 0}
  1101. organizationId:
  1102. allOf:
  1103. - $ref: '#/StringId'
  1104. description: 目标归属部门;缺省沿用现有归属,调整到其他部门仅ADMIN。
  1105. DeleteDocumentData:
  1106. type: object
  1107. additionalProperties: false
  1108. required: [id, deleted]
  1109. properties:
  1110. id: {$ref: '#/StringId'}
  1111. deleted: {type: boolean, enum: [true]}
  1112. DeleteDocumentResponse:
  1113. type: object
  1114. additionalProperties: false
  1115. required: [code, message, data, requestId]
  1116. properties:
  1117. code: {type: string, enum: [OK]}
  1118. message: {type: string, enum: [success]}
  1119. data: {$ref: '#/DeleteDocumentData'}
  1120. requestId: {type: string, format: uuid}
  1121. BatchImportMultipart:
  1122. type: object
  1123. additionalProperties: false
  1124. required: [files, items]
  1125. properties:
  1126. files:
  1127. type: array
  1128. minItems: 1
  1129. items: {type: string, format: binary}
  1130. description: 重复files字段,顺序与items数组严格对应。
  1131. items:
  1132. type: string
  1133. description: 文档或附件metadata对象数组的JSON字符串。
  1134. BatchImportItem:
  1135. type: object
  1136. additionalProperties: false
  1137. required: [index, originalFileName, success]
  1138. properties:
  1139. index: {type: integer, minimum: 0}
  1140. originalFileName: {type: string}
  1141. success: {type: boolean}
  1142. document: {$ref: '#/DocumentDetail'}
  1143. errorCode: {type: string}
  1144. errorMessage: {type: string}
  1145. BatchImportData:
  1146. type: object
  1147. additionalProperties: false
  1148. required: [total, successCount, failureCount, items]
  1149. properties:
  1150. total: {type: integer, minimum: 0}
  1151. successCount: {type: integer, minimum: 0}
  1152. failureCount: {type: integer, minimum: 0}
  1153. items:
  1154. type: array
  1155. items: {$ref: '#/BatchImportItem'}
  1156. BatchImportResponse:
  1157. type: object
  1158. additionalProperties: false
  1159. required: [code, message, data, requestId]
  1160. properties:
  1161. code: {type: string, enum: [OK]}
  1162. message: {type: string, enum: [success]}
  1163. data: {$ref: '#/BatchImportData'}
  1164. requestId: {type: string, format: uuid}
  1165. BindAttachmentsRequest:
  1166. type: object
  1167. additionalProperties: false
  1168. required: [attachmentIds, mainPlanRowVersion]
  1169. properties:
  1170. attachmentIds:
  1171. type: array
  1172. minItems: 1
  1173. items: {$ref: '#/StringId'}
  1174. mainPlanRowVersion:
  1175. type: integer
  1176. minimum: 0
  1177. BindAttachmentsData:
  1178. type: object
  1179. additionalProperties: false
  1180. required: [createdCount, existingCount, attachmentCount, mainPlanRowVersion]
  1181. properties:
  1182. createdCount: {type: integer, minimum: 0}
  1183. existingCount: {type: integer, minimum: 0}
  1184. attachmentCount: {type: integer, minimum: 0}
  1185. mainPlanRowVersion: {type: integer, minimum: 0}
  1186. BindAttachmentsResponse:
  1187. type: object
  1188. additionalProperties: false
  1189. required: [code, message, data, requestId]
  1190. properties:
  1191. code: {type: string, enum: [OK]}
  1192. message: {type: string, enum: [success]}
  1193. data: {$ref: '#/BindAttachmentsData'}
  1194. requestId: {type: string, format: uuid}
  1195. UnbindAttachmentData:
  1196. type: object
  1197. additionalProperties: false
  1198. required: [attachmentCount, mainPlanRowVersion]
  1199. properties:
  1200. attachmentCount: {type: integer, minimum: 0}
  1201. mainPlanRowVersion: {type: integer, minimum: 0}
  1202. UnbindAttachmentResponse:
  1203. type: object
  1204. additionalProperties: false
  1205. required: [code, message, data, requestId]
  1206. properties:
  1207. code: {type: string, enum: [OK]}
  1208. message: {type: string, enum: [success]}
  1209. data: {$ref: '#/UnbindAttachmentData'}
  1210. requestId: {type: string, format: uuid}
  1211. ReorderDocumentsRequest:
  1212. type: object
  1213. additionalProperties: false
  1214. required: [orderedIds]
  1215. properties:
  1216. orderedIds:
  1217. type: array
  1218. minItems: 2
  1219. items: {$ref: '#/StringId'}
  1220. ReorderDocumentsData:
  1221. type: object
  1222. additionalProperties: false
  1223. required: [reorderedCount]
  1224. properties:
  1225. reorderedCount: {type: integer, minimum: 0}
  1226. ReorderDocumentsResponse:
  1227. type: object
  1228. additionalProperties: false
  1229. required: [code, message, data, requestId]
  1230. properties:
  1231. code: {type: string, enum: [OK]}
  1232. message: {type: string, enum: [success]}
  1233. data: {$ref: '#/ReorderDocumentsData'}
  1234. requestId: {type: string, format: uuid}
  1235. ReorderAttachmentsRequest:
  1236. type: object
  1237. additionalProperties: false
  1238. required: [orderedBindingIds, mainPlanRowVersion]
  1239. properties:
  1240. orderedBindingIds:
  1241. type: array
  1242. minItems: 2
  1243. items: {$ref: '#/StringId'}
  1244. mainPlanRowVersion:
  1245. type: integer
  1246. minimum: 0
  1247. ReorderAttachmentsData:
  1248. type: object
  1249. additionalProperties: false
  1250. required: [reorderedCount, mainPlanRowVersion]
  1251. properties:
  1252. reorderedCount: {type: integer, minimum: 0}
  1253. mainPlanRowVersion: {type: integer, minimum: 0}
  1254. ReorderAttachmentsResponse:
  1255. type: object
  1256. additionalProperties: false
  1257. required: [code, message, data, requestId]
  1258. properties:
  1259. code: {type: string, enum: [OK]}
  1260. message: {type: string, enum: [success]}
  1261. data: {$ref: '#/ReorderAttachmentsData'}
  1262. requestId: {type: string, format: uuid}
  1263. ReorderCategoriesRequest:
  1264. type: object
  1265. additionalProperties: false
  1266. required: [parentId, orderedIds]
  1267. properties:
  1268. parentId:
  1269. oneOf:
  1270. - $ref: '#/StringId'
  1271. - type: 'null'
  1272. orderedIds:
  1273. type: array
  1274. minItems: 2
  1275. items: {$ref: '#/StringId'}
  1276. ReorderCategoriesData:
  1277. type: object
  1278. additionalProperties: false
  1279. required: [reorderedCount]
  1280. properties:
  1281. reorderedCount: {type: integer, minimum: 0}
  1282. ReorderCategoriesResponse:
  1283. type: object
  1284. additionalProperties: false
  1285. required: [code, message, data, requestId]
  1286. properties:
  1287. code: {type: string, enum: [OK]}
  1288. message: {type: string, enum: [success]}
  1289. data: {$ref: '#/ReorderCategoriesData'}
  1290. requestId: {type: string, format: uuid}
  1291. PermissionEntry:
  1292. type: object
  1293. additionalProperties: false
  1294. required:
  1295. - id
  1296. - subjectType
  1297. - subjectId
  1298. - subjectName
  1299. - canView
  1300. - canDownload
  1301. - canEdit
  1302. - canManagePermission
  1303. - canDelete
  1304. properties:
  1305. id: {$ref: '#/StringId'}
  1306. subjectType: {$ref: '#/SubjectType'}
  1307. subjectId: {$ref: '#/StringId'}
  1308. subjectName: {type: string}
  1309. canView: {type: boolean}
  1310. canDownload: {type: boolean}
  1311. canEdit: {type: boolean}
  1312. canManagePermission: {type: boolean}
  1313. canDelete: {type: boolean}
  1314. SavePermissionEntry:
  1315. type: object
  1316. additionalProperties: false
  1317. required:
  1318. - subjectType
  1319. - subjectId
  1320. - canView
  1321. - canDownload
  1322. - canEdit
  1323. - canManagePermission
  1324. - canDelete
  1325. properties:
  1326. subjectType: {$ref: '#/SubjectType'}
  1327. subjectId: {$ref: '#/StringId'}
  1328. canView: {type: boolean}
  1329. canDownload: {type: boolean}
  1330. canEdit: {type: boolean}
  1331. canManagePermission: {type: boolean}
  1332. canDelete: {type: boolean}
  1333. SavePermissionsRequest:
  1334. type: object
  1335. additionalProperties: false
  1336. required: [visibilityType, documentRowVersion, entries]
  1337. properties:
  1338. visibilityType: {$ref: '#/VisibilityType'}
  1339. documentRowVersion: {type: integer, minimum: 0}
  1340. entries:
  1341. type: array
  1342. items: {$ref: '#/SavePermissionEntry'}
  1343. description: ALL_AUTHENTICATED必须为空;ORGANIZATION至少一个ORG;CUSTOM可为空。
  1344. PermissionDetail:
  1345. type: object
  1346. additionalProperties: false
  1347. required:
  1348. - documentId
  1349. - sourceDocumentId
  1350. - inherited
  1351. - visibilityType
  1352. - documentRowVersion
  1353. - entries
  1354. properties:
  1355. documentId: {$ref: '#/StringId'}
  1356. sourceDocumentId: {$ref: '#/StringId'}
  1357. inherited: {type: boolean}
  1358. visibilityType: {$ref: '#/VisibilityType'}
  1359. documentRowVersion: {type: integer, minimum: 0}
  1360. entries:
  1361. type: array
  1362. items: {$ref: '#/PermissionEntry'}
  1363. PermissionDetailResponse:
  1364. type: object
  1365. additionalProperties: false
  1366. required: [code, message, data, requestId]
  1367. properties:
  1368. code: {type: string, enum: [OK]}
  1369. message: {type: string, enum: [success]}
  1370. data: {$ref: '#/PermissionDetail'}
  1371. requestId: {type: string, format: uuid}
  1372. AuditGranularity:
  1373. type: string
  1374. enum: [DAY, WEEK, MONTH]
  1375. AuditLogSummary:
  1376. type: object
  1377. additionalProperties: false
  1378. required:
  1379. - id
  1380. - username
  1381. - realName
  1382. - organizationName
  1383. - actionType
  1384. - targetType
  1385. - targetId
  1386. - targetName
  1387. - operationResult
  1388. - failureReason
  1389. - clientIp
  1390. - requestId
  1391. - createdAt
  1392. properties:
  1393. id: {$ref: '#/StringId'}
  1394. username: {type: string, nullable: true}
  1395. realName: {type: string, nullable: true}
  1396. organizationName: {type: string, nullable: true}
  1397. actionType: {$ref: '#/AuditAction'}
  1398. targetType:
  1399. allOf: [{$ref: '#/AuditTarget'}]
  1400. nullable: true
  1401. targetId:
  1402. allOf: [{$ref: '#/StringId'}]
  1403. nullable: true
  1404. targetName: {type: string, nullable: true}
  1405. operationResult: {$ref: '#/AuditResult'}
  1406. failureReason: {type: string, nullable: true}
  1407. clientIp: {type: string, nullable: true}
  1408. requestId: {type: string, nullable: true}
  1409. createdAt: {$ref: '#/UtcDateTime'}
  1410. AuditLogPage:
  1411. type: object
  1412. additionalProperties: false
  1413. required: [items, page, pageSize, total, totalPages]
  1414. properties:
  1415. items: {type: array, items: {$ref: '#/AuditLogSummary'}}
  1416. page: {type: integer, minimum: 1}
  1417. pageSize: {type: integer, minimum: 1, maximum: 100}
  1418. total: {type: integer, minimum: 0}
  1419. totalPages: {type: integer, minimum: 0}
  1420. AuditLogPageResponse:
  1421. type: object
  1422. additionalProperties: false
  1423. required: [code, message, data, requestId]
  1424. properties:
  1425. code: {type: string, enum: [OK]}
  1426. message: {type: string, enum: [success]}
  1427. data: {$ref: '#/AuditLogPage'}
  1428. requestId: {type: string, format: uuid}
  1429. DocumentStatistics:
  1430. type: object
  1431. additionalProperties: false
  1432. required: [planDocumentCount, mainPlanCount, subPlanCount, attachmentCount, todayViewerCount]
  1433. properties:
  1434. planDocumentCount: {type: integer, minimum: 0}
  1435. mainPlanCount: {type: integer, minimum: 0}
  1436. subPlanCount: {type: integer, minimum: 0}
  1437. attachmentCount: {type: integer, minimum: 0}
  1438. todayViewerCount: {type: integer, minimum: 0}
  1439. DocumentStatisticsResponse:
  1440. type: object
  1441. additionalProperties: false
  1442. required: [code, message, data, requestId]
  1443. properties:
  1444. code: {type: string, enum: [OK]}
  1445. message: {type: string, enum: [success]}
  1446. data: {$ref: '#/DocumentStatistics'}
  1447. requestId: {type: string, format: uuid}
  1448. AuditTrendItem:
  1449. type: object
  1450. additionalProperties: false
  1451. required: [period, operationCount]
  1452. properties:
  1453. period: {type: string}
  1454. operationCount: {type: integer, minimum: 0}
  1455. AuditTrendData:
  1456. type: object
  1457. additionalProperties: false
  1458. required: [items]
  1459. properties:
  1460. items: {type: array, items: {$ref: '#/AuditTrendItem'}}
  1461. AuditTrendResponse:
  1462. type: object
  1463. additionalProperties: false
  1464. required: [code, message, data, requestId]
  1465. properties:
  1466. code: {type: string, enum: [OK]}
  1467. message: {type: string, enum: [success]}
  1468. data: {$ref: '#/AuditTrendData'}
  1469. requestId: {type: string, format: uuid}
  1470. AuditActionStatisticsItem:
  1471. type: object
  1472. additionalProperties: false
  1473. required: [actionType, count]
  1474. properties:
  1475. actionType: {$ref: '#/AuditAction'}
  1476. count: {type: integer, minimum: 0}
  1477. AuditActionStatisticsData:
  1478. type: object
  1479. additionalProperties: false
  1480. required: [items]
  1481. properties:
  1482. items: {type: array, items: {$ref: '#/AuditActionStatisticsItem'}}
  1483. AuditActionStatisticsResponse:
  1484. type: object
  1485. additionalProperties: false
  1486. required: [code, message, data, requestId]
  1487. properties:
  1488. code: {type: string, enum: [OK]}
  1489. message: {type: string, enum: [success]}
  1490. data: {$ref: '#/AuditActionStatisticsData'}
  1491. requestId: {type: string, format: uuid}
  1492. AuditUserStatisticsItem:
  1493. type: object
  1494. additionalProperties: false
  1495. required: [userId, realName, organizationName, operationCount]
  1496. properties:
  1497. userId: {$ref: '#/StringId'}
  1498. realName: {type: string, nullable: true}
  1499. organizationName: {type: string, nullable: true}
  1500. operationCount: {type: integer, minimum: 0}
  1501. AuditUserStatisticsData:
  1502. type: object
  1503. additionalProperties: false
  1504. required: [items]
  1505. properties:
  1506. items: {type: array, items: {$ref: '#/AuditUserStatisticsItem'}}
  1507. AuditUserStatisticsResponse:
  1508. type: object
  1509. additionalProperties: false
  1510. required: [code, message, data, requestId]
  1511. properties:
  1512. code: {type: string, enum: [OK]}
  1513. message: {type: string, enum: [success]}
  1514. data: {$ref: '#/AuditUserStatisticsData'}
  1515. requestId: {type: string, format: uuid}
  1516. DeletedBySnapshot:
  1517. type: object
  1518. additionalProperties: false
  1519. required: [userId, username, realName, organizationName]
  1520. properties:
  1521. userId:
  1522. allOf:
  1523. - $ref: '#/StringId'
  1524. nullable: true
  1525. username: {type: string, nullable: true}
  1526. realName: {type: string, nullable: true}
  1527. organizationName: {type: string, nullable: true}
  1528. RecycleBinDocumentSummary:
  1529. type: object
  1530. additionalProperties: false
  1531. required:
  1532. - id
  1533. - documentName
  1534. - documentType
  1535. - originalFileName
  1536. - categoryId
  1537. - categoryName
  1538. - parentDocumentId
  1539. - securityLevel
  1540. - documentStatus
  1541. - deletedAt
  1542. - updatedBy
  1543. - updatedByName
  1544. - deletedBy
  1545. - rowVersion
  1546. properties:
  1547. id: {$ref: '#/StringId'}
  1548. documentName: {type: string}
  1549. documentType: {$ref: '#/DocumentType'}
  1550. originalFileName: {type: string}
  1551. categoryId:
  1552. allOf:
  1553. - $ref: '#/StringId'
  1554. nullable: true
  1555. categoryName: {type: string, nullable: true}
  1556. parentDocumentId:
  1557. allOf:
  1558. - $ref: '#/StringId'
  1559. nullable: true
  1560. securityLevel: {$ref: '#/SecurityLevel'}
  1561. documentStatus: {$ref: '#/DocumentStatus'}
  1562. deletedAt: {$ref: '#/UtcDateTime'}
  1563. updatedBy:
  1564. allOf:
  1565. - $ref: '#/StringId'
  1566. nullable: true
  1567. updatedByName: {type: string, nullable: true}
  1568. deletedBy:
  1569. allOf:
  1570. - $ref: '#/DeletedBySnapshot'
  1571. nullable: true
  1572. rowVersion: {type: integer, minimum: 0}
  1573. RecycleBinDocumentPage:
  1574. type: object
  1575. additionalProperties: false
  1576. required: [items, page, pageSize, total, totalPages]
  1577. properties:
  1578. items:
  1579. type: array
  1580. items: {$ref: '#/RecycleBinDocumentSummary'}
  1581. page: {type: integer, minimum: 1}
  1582. pageSize: {type: integer, minimum: 1, maximum: 100}
  1583. total: {type: integer, minimum: 0}
  1584. totalPages: {type: integer, minimum: 0}
  1585. RecycleBinDocumentPageResponse:
  1586. type: object
  1587. additionalProperties: false
  1588. required: [code, message, data, requestId]
  1589. properties:
  1590. code: {type: string, enum: [OK]}
  1591. message: {type: string, enum: [success]}
  1592. data: {$ref: '#/RecycleBinDocumentPage'}
  1593. requestId: {type: string, format: uuid}
  1594. RestoreDocumentRequest:
  1595. type: object
  1596. additionalProperties: false
  1597. required: [rowVersion]
  1598. properties:
  1599. rowVersion: {type: integer, minimum: 0}
  1600. RestoredDocument:
  1601. allOf:
  1602. - $ref: '#/DocumentSummary'
  1603. - type: object
  1604. required: [originalFileName, mimeType, fileSize, permissionSummary]
  1605. properties:
  1606. originalFileName: {type: string}
  1607. mimeType: {type: string, nullable: true}
  1608. fileSize: {type: integer, minimum: 0}
  1609. permissionSummary: {$ref: '#/PermissionSummary'}
  1610. mountedPlanCount: {type: integer, minimum: 0}
  1611. RestoreDocumentResult:
  1612. type: object
  1613. additionalProperties: false
  1614. required:
  1615. - document
  1616. - restoredPermissionCount
  1617. - skippedPermissionCount
  1618. - restoredBindingCount
  1619. - skippedBindingCount
  1620. properties:
  1621. document: {$ref: '#/RestoredDocument'}
  1622. restoredPermissionCount: {type: integer, minimum: 0}
  1623. skippedPermissionCount: {type: integer, minimum: 0}
  1624. restoredBindingCount: {type: integer, minimum: 0}
  1625. skippedBindingCount: {type: integer, minimum: 0}
  1626. RestoreDocumentResponse:
  1627. type: object
  1628. additionalProperties: false
  1629. required: [code, message, data, requestId]
  1630. properties:
  1631. code: {type: string, enum: [OK]}
  1632. message: {type: string, enum: [success]}
  1633. data: {$ref: '#/RestoreDocumentResult'}
  1634. requestId: {type: string, format: uuid}
  1635. DictionaryOption:
  1636. type: object
  1637. additionalProperties: false
  1638. required: [code, label, sortNo]
  1639. properties:
  1640. code: {type: string, minLength: 1}
  1641. label: {type: string, minLength: 1}
  1642. sortNo: {type: integer, minimum: 0}
  1643. DictionaryOptionList:
  1644. type: array
  1645. items: {$ref: '#/DictionaryOption'}
  1646. UiDictionaryGroups:
  1647. type: object
  1648. additionalProperties: false
  1649. required:
  1650. - roleCodes
  1651. - allowedModules
  1652. - documentTypes
  1653. - documentStatuses
  1654. - securityLevels
  1655. - visibilityTypes
  1656. - attachmentTypes
  1657. - subjectTypes
  1658. - deptScopes
  1659. - allowedActions
  1660. - categoryTypes
  1661. - enabledStatuses
  1662. - auditResults
  1663. - auditActions
  1664. - auditTargets
  1665. properties:
  1666. roleCodes: {$ref: '#/DictionaryOptionList'}
  1667. allowedModules: {$ref: '#/DictionaryOptionList'}
  1668. documentTypes: {$ref: '#/DictionaryOptionList'}
  1669. documentStatuses: {$ref: '#/DictionaryOptionList'}
  1670. securityLevels: {$ref: '#/DictionaryOptionList'}
  1671. visibilityTypes: {$ref: '#/DictionaryOptionList'}
  1672. attachmentTypes: {$ref: '#/DictionaryOptionList'}
  1673. subjectTypes: {$ref: '#/DictionaryOptionList'}
  1674. deptScopes: {$ref: '#/DictionaryOptionList'}
  1675. allowedActions: {$ref: '#/DictionaryOptionList'}
  1676. categoryTypes: {$ref: '#/DictionaryOptionList'}
  1677. enabledStatuses: {$ref: '#/DictionaryOptionList'}
  1678. auditResults: {$ref: '#/DictionaryOptionList'}
  1679. auditActions: {$ref: '#/DictionaryOptionList'}
  1680. auditTargets: {$ref: '#/DictionaryOptionList'}
  1681. UiDictionaries:
  1682. type: object
  1683. additionalProperties: false
  1684. required: [version, locale, dictionaries]
  1685. properties:
  1686. version:
  1687. type: string
  1688. pattern: '^[0-9]{4}\.[0-9]+$'
  1689. example: '2026.1'
  1690. locale:
  1691. type: string
  1692. example: zh-CN
  1693. dictionaries: {$ref: '#/UiDictionaryGroups'}
  1694. UiDictionariesResponse:
  1695. type: object
  1696. additionalProperties: false
  1697. required: [code, message, data, requestId]
  1698. properties:
  1699. code: {type: string, enum: [OK]}
  1700. message: {type: string, enum: [success]}
  1701. data: {$ref: '#/UiDictionaries'}
  1702. requestId: {type: string, format: uuid}
  1703. CreateOrganizationRequest:
  1704. type: object
  1705. additionalProperties: false
  1706. required: [orgCode, orgName, parentId, sortNo, status]
  1707. properties:
  1708. orgCode: {type: string, minLength: 1, maxLength: 64}
  1709. orgName: {type: string, minLength: 1, maxLength: 128}
  1710. parentId:
  1711. allOf: [{$ref: '#/StringId'}]
  1712. nullable: true
  1713. sortNo: {type: integer}
  1714. status: {$ref: '#/EnabledStatus'}
  1715. UpdateOrganizationRequest:
  1716. type: object
  1717. additionalProperties: false
  1718. required: [orgName, parentId, sortNo, status, rowVersion]
  1719. properties:
  1720. orgName: {type: string, minLength: 1, maxLength: 128}
  1721. parentId:
  1722. allOf: [{$ref: '#/StringId'}]
  1723. nullable: true
  1724. sortNo: {type: integer}
  1725. status: {$ref: '#/EnabledStatus'}
  1726. rowVersion: {type: integer, minimum: 0}
  1727. OrganizationResponse:
  1728. type: object
  1729. additionalProperties: false
  1730. required: [code, message, data, requestId]
  1731. properties:
  1732. code: {type: string, enum: [OK]}
  1733. message: {type: string, enum: [success]}
  1734. data:
  1735. allOf: [{$ref: '#/OrganizationNode'}]
  1736. description: 写操作响应中children固定为空数组。
  1737. requestId: {type: string, format: uuid}
  1738. DeleteOrganizationData:
  1739. type: object
  1740. additionalProperties: false
  1741. required: [id, deleted]
  1742. properties:
  1743. id: {$ref: '#/StringId'}
  1744. deleted: {type: boolean, enum: [true]}
  1745. DeleteOrganizationResponse:
  1746. type: object
  1747. additionalProperties: false
  1748. required: [code, message, data, requestId]
  1749. properties:
  1750. code: {type: string, enum: [OK]}
  1751. message: {type: string, enum: [success]}
  1752. data: {$ref: '#/DeleteOrganizationData'}
  1753. requestId: {type: string, format: uuid}
  1754. CreateUserRequest:
  1755. type: object
  1756. additionalProperties: false
  1757. required: [username, realName, initialPassword, organizationId, roleCode, roleId, securityLevel, status]
  1758. properties:
  1759. username: {type: string, minLength: 1, maxLength: 64}
  1760. realName: {type: string, minLength: 1, maxLength: 64}
  1761. initialPassword: {type: string, format: password, minLength: 8, maxLength: 64, writeOnly: true}
  1762. organizationId:
  1763. allOf: [{$ref: '#/StringId'}]
  1764. nullable: true
  1765. roleCode: {$ref: '#/RoleCode'}
  1766. roleId:
  1767. allOf: [{$ref: '#/StringId'}]
  1768. nullable: true
  1769. securityLevel: {$ref: '#/SecurityLevel'}
  1770. status: {$ref: '#/EnabledStatus'}
  1771. UpdateUserRequest:
  1772. type: object
  1773. additionalProperties: false
  1774. required: [realName, organizationId, roleCode, roleId, securityLevel, status, rowVersion]
  1775. properties:
  1776. realName: {type: string, minLength: 1, maxLength: 64}
  1777. organizationId:
  1778. allOf: [{$ref: '#/StringId'}]
  1779. nullable: true
  1780. roleCode: {$ref: '#/RoleCode'}
  1781. roleId:
  1782. allOf: [{$ref: '#/StringId'}]
  1783. nullable: true
  1784. securityLevel: {$ref: '#/SecurityLevel'}
  1785. status: {$ref: '#/EnabledStatus'}
  1786. rowVersion: {type: integer, minimum: 0}
  1787. DeleteUserData:
  1788. type: object
  1789. additionalProperties: false
  1790. required: [id, deleted]
  1791. properties:
  1792. id: {$ref: '#/StringId'}
  1793. deleted: {type: boolean, enum: [true]}
  1794. DeleteUserResponse:
  1795. type: object
  1796. additionalProperties: false
  1797. required: [code, message, data, requestId]
  1798. properties:
  1799. code: {type: string, enum: [OK]}
  1800. message: {type: string, enum: [success]}
  1801. data: {$ref: '#/DeleteUserData'}
  1802. requestId: {type: string, format: uuid}
  1803. ResetUserPasswordRequest:
  1804. type: object
  1805. additionalProperties: false
  1806. required: [newPassword, rowVersion]
  1807. properties:
  1808. newPassword: {type: string, format: password, minLength: 8, maxLength: 64, writeOnly: true}
  1809. rowVersion: {type: integer, minimum: 0}
  1810. ResetPasswordData:
  1811. type: object
  1812. additionalProperties: false
  1813. required: [id, reset, authVersion]
  1814. properties:
  1815. id: {$ref: '#/StringId'}
  1816. reset: {type: boolean, enum: [true]}
  1817. authVersion: {type: integer, minimum: 0}
  1818. ResetPasswordResponse:
  1819. type: object
  1820. additionalProperties: false
  1821. required: [code, message, data, requestId]
  1822. properties:
  1823. code: {type: string, enum: [OK]}
  1824. message: {type: string, enum: [success]}
  1825. data: {$ref: '#/ResetPasswordData'}
  1826. requestId: {type: string, format: uuid}
  1827. DocumentTagCollection:
  1828. type: object
  1829. additionalProperties: false
  1830. required: [items, total]
  1831. properties:
  1832. items:
  1833. type: array
  1834. items: {type: string}
  1835. description: 当前用户可见的主案标签,按Unicode升序。
  1836. total: {type: integer, minimum: 0}
  1837. DocumentTagsResponse:
  1838. type: object
  1839. additionalProperties: false
  1840. required: [code, message, data, requestId]
  1841. properties:
  1842. code: {type: string, enum: [OK]}
  1843. message: {type: string, enum: [success]}
  1844. data: {$ref: '#/DocumentTagCollection'}
  1845. requestId: {type: string, format: uuid}
  1846. RuntimeConfigData:
  1847. type: object
  1848. additionalProperties: false
  1849. required: [pdfViewerEngine]
  1850. properties:
  1851. pdfViewerEngine:
  1852. type: string
  1853. enum: [iframe, pdfjs]
  1854. description: 后端PDF预览引擎策略,由.env决定。
  1855. RuntimeConfigResponse:
  1856. type: object
  1857. additionalProperties: false
  1858. required: [code, message, data, requestId]
  1859. properties:
  1860. code: {type: string, enum: [OK]}
  1861. message: {type: string, enum: [success]}
  1862. data: {$ref: '#/RuntimeConfigData'}
  1863. requestId: {type: string, format: uuid}
  1864. DeptScope:
  1865. type: string
  1866. description: 权限矩阵部门范围:所属部门方案/其他部门方案(其他部门含所属部门子树外全部部门与无归属文档)。
  1867. enum: [OWN, OTHER]
  1868. RoleSummary:
  1869. type: object
  1870. additionalProperties: false
  1871. required: [id, roleName, sortNo, status, remark, isDefault, memberCount, rowVersion]
  1872. properties:
  1873. id: {$ref: '#/StringId'}
  1874. roleName: {type: string, maxLength: 64}
  1875. sortNo: {type: integer, minimum: 0, maximum: 999999}
  1876. status: {$ref: '#/EnabledStatus'}
  1877. remark:
  1878. type: string
  1879. nullable: true
  1880. maxLength: 255
  1881. isDefault: {type: boolean}
  1882. memberCount: {type: integer, minimum: 0}
  1883. rowVersion: {type: integer, minimum: 0}
  1884. RolePage:
  1885. type: object
  1886. additionalProperties: false
  1887. required: [items, page, pageSize, total, totalPages]
  1888. properties:
  1889. items:
  1890. type: array
  1891. items:
  1892. $ref: '#/RoleSummary'
  1893. page:
  1894. type: integer
  1895. minimum: 1
  1896. pageSize:
  1897. type: integer
  1898. minimum: 1
  1899. maximum: 100
  1900. total:
  1901. type: integer
  1902. minimum: 0
  1903. totalPages:
  1904. type: integer
  1905. minimum: 0
  1906. RolePageResponse:
  1907. type: object
  1908. additionalProperties: false
  1909. required: [code, message, data, requestId]
  1910. properties:
  1911. code: {type: string, enum: [OK]}
  1912. message: {type: string, enum: [success]}
  1913. data: {$ref: '#/RolePage'}
  1914. requestId: {type: string, format: uuid}
  1915. CreateRoleRequest:
  1916. type: object
  1917. additionalProperties: false
  1918. required: [roleName, sortNo, status, remark, isDefault]
  1919. properties:
  1920. roleName: {type: string, minLength: 1, maxLength: 64}
  1921. sortNo: {type: integer, minimum: 0, maximum: 999999}
  1922. status: {$ref: '#/EnabledStatus'}
  1923. remark:
  1924. type: string
  1925. nullable: true
  1926. maxLength: 255
  1927. isDefault: {type: boolean}
  1928. UpdateRoleRequest:
  1929. type: object
  1930. additionalProperties: false
  1931. required: [roleName, sortNo, status, remark, isDefault, rowVersion]
  1932. properties:
  1933. roleName: {type: string, minLength: 1, maxLength: 64}
  1934. sortNo: {type: integer, minimum: 0, maximum: 999999}
  1935. status: {$ref: '#/EnabledStatus'}
  1936. remark:
  1937. type: string
  1938. nullable: true
  1939. maxLength: 255
  1940. isDefault: {type: boolean}
  1941. rowVersion: {type: integer, minimum: 0}
  1942. RoleResponse:
  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: {$ref: '#/RoleSummary'}
  1950. requestId: {type: string, format: uuid}
  1951. DeleteRoleData:
  1952. type: object
  1953. additionalProperties: false
  1954. required: [id, deleted]
  1955. properties:
  1956. id: {$ref: '#/StringId'}
  1957. deleted: {type: boolean, enum: [true]}
  1958. DeleteRoleResponse:
  1959. type: object
  1960. additionalProperties: false
  1961. required: [code, message, data, requestId]
  1962. properties:
  1963. code: {type: string, enum: [OK]}
  1964. message: {type: string, enum: [success]}
  1965. data: {$ref: '#/DeleteRoleData'}
  1966. requestId: {type: string, format: uuid}
  1967. RolePermissionRow:
  1968. type: object
  1969. additionalProperties: false
  1970. required: [securityLevel, deptScope, canView, canDownload, canEdit, canDelete, canConfigPermission, canBindAttachment, canUnbindAttachment]
  1971. properties:
  1972. securityLevel: {$ref: '#/SecurityLevel'}
  1973. deptScope: {$ref: '#/DeptScope'}
  1974. canView: {type: boolean}
  1975. canDownload: {type: boolean}
  1976. canEdit: {type: boolean}
  1977. canDelete: {type: boolean}
  1978. canConfigPermission: {type: boolean}
  1979. canBindAttachment: {type: boolean}
  1980. canUnbindAttachment: {type: boolean}
  1981. RoleMatrixListResponse:
  1982. type: object
  1983. additionalProperties: false
  1984. required: [code, message, data, requestId]
  1985. properties:
  1986. code: {type: string, enum: [OK]}
  1987. message: {type: string, enum: [success]}
  1988. data:
  1989. type: array
  1990. minItems: 15
  1991. maxItems: 15
  1992. items:
  1993. $ref: '#/RolePermissionRow'
  1994. requestId: {type: string, format: uuid}
  1995. UpdateRolePermissionsRequest:
  1996. type: object
  1997. additionalProperties: false
  1998. required: [matrix, rowVersion]
  1999. properties:
  2000. matrix:
  2001. type: array
  2002. minItems: 15
  2003. maxItems: 15
  2004. items:
  2005. $ref: '#/RolePermissionRow'
  2006. rowVersion: {type: integer, minimum: 0}
  2007. RolePermissionsData:
  2008. type: object
  2009. additionalProperties: false
  2010. required: [id, matrix, rowVersion]
  2011. properties:
  2012. id: {$ref: '#/StringId'}
  2013. matrix:
  2014. type: array
  2015. minItems: 15
  2016. maxItems: 15
  2017. items:
  2018. $ref: '#/RolePermissionRow'
  2019. rowVersion: {type: integer, minimum: 0}
  2020. RolePermissionsResponse:
  2021. type: object
  2022. additionalProperties: false
  2023. required: [code, message, data, requestId]
  2024. properties:
  2025. code: {type: string, enum: [OK]}
  2026. message: {type: string, enum: [success]}
  2027. data: {$ref: '#/RolePermissionsData'}
  2028. requestId: {type: string, format: uuid}
  2029. RoleUsersData:
  2030. type: object
  2031. additionalProperties: false
  2032. required: [id, userIds]
  2033. properties:
  2034. id: {$ref: '#/StringId'}
  2035. userIds:
  2036. type: array
  2037. items: {$ref: '#/StringId'}
  2038. uniqueItems: true
  2039. rowVersion: {type: integer, minimum: 0}
  2040. RoleUsersResponse:
  2041. type: object
  2042. additionalProperties: false
  2043. required: [code, message, data, requestId]
  2044. properties:
  2045. code: {type: string, enum: [OK]}
  2046. message: {type: string, enum: [success]}
  2047. data: {$ref: '#/RoleUsersData'}
  2048. requestId: {type: string, format: uuid}
  2049. UpdateRoleUsersRequest:
  2050. type: object
  2051. additionalProperties: false
  2052. required: [userIds, rowVersion]
  2053. properties:
  2054. userIds:
  2055. type: array
  2056. items: {$ref: '#/StringId'}
  2057. uniqueItems: true
  2058. rowVersion: {type: integer, minimum: 0}
  2059. DocumentRelationPreset:
  2060. type: object
  2061. additionalProperties: false
  2062. required: [code, label, sortNo]
  2063. properties:
  2064. code: {type: string, minLength: 1, description: 预置类型稳定编码(仅用于前端下拉匹配,不落库)}
  2065. label: {type: string, minLength: 1, description: 预置关系文本(保存时直接写入relation_type)}
  2066. sortNo: {type: integer, minimum: 0}
  2067. DocumentRelationPresetsResponse:
  2068. type: object
  2069. additionalProperties: false
  2070. required: [code, message, data, requestId]
  2071. properties:
  2072. code: {type: string, enum: [OK]}
  2073. message: {type: string, enum: [success]}
  2074. data:
  2075. type: object
  2076. additionalProperties: false
  2077. required: [presets]
  2078. properties:
  2079. presets:
  2080. type: array
  2081. items: {$ref: '#/DocumentRelationPreset'}
  2082. requestId: {type: string, format: uuid}
  2083. DocumentRelationItem:
  2084. type: object
  2085. additionalProperties: false
  2086. required: [relatedDocumentId, relatedDocumentName, relationType]
  2087. properties:
  2088. relatedDocumentId: {$ref: '#/StringId'}
  2089. relatedDocumentName: {type: string, minLength: 1}
  2090. relationType: {type: string, minLength: 1, maxLength: 64, description: 关系文本(预置label或用户自定义)}
  2091. DocumentRelationsResponse:
  2092. type: object
  2093. additionalProperties: false
  2094. required: [code, message, data, requestId]
  2095. properties:
  2096. code: {type: string, enum: [OK]}
  2097. message: {type: string, enum: [success]}
  2098. data:
  2099. type: object
  2100. additionalProperties: false
  2101. required: [items]
  2102. properties:
  2103. items:
  2104. type: array
  2105. items: {$ref: '#/DocumentRelationItem'}
  2106. requestId: {type: string, format: uuid}
  2107. UpdateDocumentRelationsRequest:
  2108. type: object
  2109. additionalProperties: false
  2110. required: [relations, rowVersion]
  2111. properties:
  2112. relations:
  2113. type: array
  2114. maxItems: 50
  2115. items:
  2116. type: object
  2117. additionalProperties: false
  2118. required: [relatedDocumentId, relationType]
  2119. properties:
  2120. relatedDocumentId: {$ref: '#/StringId'}
  2121. relationType: {type: string, minLength: 1, maxLength: 64}
  2122. uniqueItems: true
  2123. rowVersion: {type: integer, minimum: 0}
  2124. DocumentRelationsSaveResponse:
  2125. type: object
  2126. additionalProperties: false
  2127. required: [code, message, data, requestId]
  2128. properties:
  2129. code: {type: string, enum: [OK]}
  2130. message: {type: string, enum: [success]}
  2131. data:
  2132. type: object
  2133. additionalProperties: false
  2134. required: [relations, rowVersion]
  2135. properties:
  2136. relations:
  2137. type: array
  2138. items: {$ref: '#/DocumentRelationItem'}
  2139. rowVersion: {type: integer, minimum: 0}
  2140. requestId: {type: string, format: uuid}
  2141. IpEntrySummary:
  2142. type: object
  2143. additionalProperties: false
  2144. required: [id, ipValue, remark, rowVersion]
  2145. properties:
  2146. id: {$ref: '#/StringId'}
  2147. ipValue:
  2148. type: string
  2149. minLength: 1
  2150. maxLength: 64
  2151. description: 规范化后的精确IP或CIDR网段文本(IPv6为压缩形式,网段主机位为0)。
  2152. remark:
  2153. type: string
  2154. maxLength: 128
  2155. rowVersion: {type: integer, minimum: 0}
  2156. IpEntryPage:
  2157. type: object
  2158. additionalProperties: false
  2159. required: [items, page, pageSize, total, totalPages]
  2160. properties:
  2161. items:
  2162. type: array
  2163. items:
  2164. $ref: '#/IpEntrySummary'
  2165. page:
  2166. type: integer
  2167. minimum: 1
  2168. pageSize:
  2169. type: integer
  2170. minimum: 1
  2171. maximum: 100
  2172. total:
  2173. type: integer
  2174. minimum: 0
  2175. totalPages:
  2176. type: integer
  2177. minimum: 0
  2178. IpEntryPageResponse:
  2179. type: object
  2180. additionalProperties: false
  2181. required: [code, message, data, requestId]
  2182. properties:
  2183. code: {type: string, enum: [OK]}
  2184. message: {type: string, enum: [success]}
  2185. data: {$ref: '#/IpEntryPage'}
  2186. requestId: {type: string, format: uuid}
  2187. CreateIpEntryRequest:
  2188. type: object
  2189. additionalProperties: false
  2190. required: [ipValue, remark]
  2191. properties:
  2192. ipValue: {type: string, minLength: 1, maxLength: 64}
  2193. remark: {type: string, maxLength: 128}
  2194. UpdateIpEntryRequest:
  2195. type: object
  2196. additionalProperties: false
  2197. required: [ipValue, remark, rowVersion]
  2198. properties:
  2199. ipValue: {type: string, minLength: 1, maxLength: 64}
  2200. remark: {type: string, maxLength: 128}
  2201. rowVersion: {type: integer, minimum: 0}
  2202. IpEntryResponse:
  2203. type: object
  2204. additionalProperties: false
  2205. required: [code, message, data, requestId]
  2206. properties:
  2207. code: {type: string, enum: [OK]}
  2208. message: {type: string, enum: [success]}
  2209. data: {$ref: '#/IpEntrySummary'}
  2210. requestId: {type: string, format: uuid}
  2211. DeleteIpEntryData:
  2212. type: object
  2213. additionalProperties: false
  2214. required: [id, deleted]
  2215. properties:
  2216. id: {$ref: '#/StringId'}
  2217. deleted: {type: boolean, enum: [true]}
  2218. DeleteIpEntryResponse:
  2219. type: object
  2220. additionalProperties: false
  2221. required: [code, message, data, requestId]
  2222. properties:
  2223. code: {type: string, enum: [OK]}
  2224. message: {type: string, enum: [success]}
  2225. data: {$ref: '#/DeleteIpEntryData'}
  2226. requestId: {type: string, format: uuid}
  2227. OrgIpAssignmentListData:
  2228. type: object
  2229. additionalProperties: false
  2230. required: [ipEntryIds]
  2231. properties:
  2232. ipEntryIds:
  2233. type: array
  2234. items: {$ref: '#/StringId'}
  2235. uniqueItems: true
  2236. OrgIpAssignmentListResponse:
  2237. type: object
  2238. additionalProperties: false
  2239. required: [code, message, data, requestId]
  2240. properties:
  2241. code: {type: string, enum: [OK]}
  2242. message: {type: string, enum: [success]}
  2243. data: {$ref: '#/OrgIpAssignmentListData'}
  2244. requestId: {type: string, format: uuid}
  2245. UpdateOrgIpAssignmentsRequest:
  2246. type: object
  2247. additionalProperties: false
  2248. required: [ipEntryIds, rowVersion]
  2249. properties:
  2250. ipEntryIds:
  2251. type: array
  2252. items: {$ref: '#/StringId'}
  2253. uniqueItems: true
  2254. rowVersion: {type: integer, minimum: 0}
  2255. OrgIpAssignmentsData:
  2256. type: object
  2257. additionalProperties: false
  2258. required: [id, ipEntryIds, rowVersion]
  2259. properties:
  2260. id: {$ref: '#/StringId'}
  2261. ipEntryIds:
  2262. type: array
  2263. items: {$ref: '#/StringId'}
  2264. uniqueItems: true
  2265. rowVersion: {type: integer, minimum: 0}
  2266. OrgIpAssignmentsResponse:
  2267. type: object
  2268. additionalProperties: false
  2269. required: [code, message, data, requestId]
  2270. properties:
  2271. code: {type: string, enum: [OK]}
  2272. message: {type: string, enum: [success]}
  2273. data: {$ref: '#/OrgIpAssignmentsData'}
  2274. requestId: {type: string, format: uuid}