schemas.yaml 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539
  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]
  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: [POLICY, WORK_STANDARD, TABLE, DIAGRAM, OTHER]
  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. AuditTarget:
  78. type: string
  79. enum:
  80. - AUTH
  81. - CATEGORY
  82. - DOCUMENT
  83. - ATTACHMENT
  84. - PERMISSION
  85. - ATTACHMENT_BINDING
  86. PageResult:
  87. type: object
  88. required: [items, page, pageSize, total, totalPages]
  89. properties:
  90. items:
  91. type: array
  92. items: {}
  93. page:
  94. type: integer
  95. minimum: 1
  96. default: 1
  97. pageSize:
  98. type: integer
  99. minimum: 1
  100. maximum: 100
  101. default: 20
  102. total:
  103. type: integer
  104. minimum: 0
  105. totalPages:
  106. type: integer
  107. minimum: 0
  108. HealthData:
  109. type: object
  110. additionalProperties: false
  111. required: [service, status]
  112. properties:
  113. service:
  114. type: string
  115. enum: [dms]
  116. status:
  117. type: string
  118. enum: [UP]
  119. HealthResponse:
  120. type: object
  121. additionalProperties: false
  122. required: [code, message, data, requestId]
  123. properties:
  124. code:
  125. type: string
  126. enum: [OK]
  127. message:
  128. type: string
  129. enum: [success]
  130. data:
  131. $ref: '#/HealthData'
  132. requestId:
  133. type: string
  134. format: uuid
  135. ErrorResponse:
  136. type: object
  137. additionalProperties: false
  138. required: [code, message, details, requestId]
  139. properties:
  140. code:
  141. type: string
  142. enum:
  143. - INVALID_ARGUMENT
  144. - INVALID_CREDENTIALS
  145. - TOKEN_INVALID
  146. - TOKEN_EXPIRED
  147. - USER_DISABLED
  148. - AUTH_VERSION_MISMATCH
  149. - FORBIDDEN
  150. - SECURITY_LEVEL_FORBIDDEN
  151. - DOCUMENT_VIEW_FORBIDDEN
  152. - DOCUMENT_DOWNLOAD_FORBIDDEN
  153. - RESOURCE_NOT_FOUND
  154. - FILE_NOT_FOUND
  155. - UNSUPPORTED_FILE_TYPE
  156. - PREVIEW_UNAVAILABLE
  157. - PAYLOAD_TOO_LARGE
  158. - BATCH_MANIFEST_MISMATCH
  159. - DATA_VERSION_CONFLICT
  160. - DOCUMENT_NAME_CONFLICT
  161. - CATEGORY_IN_USE
  162. - CATEGORY_NOT_LEAF
  163. - MAIN_PLAN_HAS_CHILDREN
  164. - ATTACHMENT_IN_USE
  165. - ATTACHMENT_HAS_NO_ACL
  166. - SUB_PLAN_PERMISSION_INHERITED
  167. - DUPLICATE_PERMISSION_SUBJECT
  168. - MAIN_PLAN_NOT_FOUND
  169. - INTERNAL_ERROR
  170. - DOCUMENT_NOT_DELETED
  171. - FILE_INTEGRITY_MISMATCH
  172. - FILE_PATH_INVALID
  173. - RESTORE_FILE_CHANGED
  174. - RESTORE_CATEGORY_INVALID
  175. - RESTORE_PARENT_INVALID
  176. - RESTORE_PERMISSION_INVALID
  177. - RESTORE_RELATION_CONFLICT
  178. message:
  179. type: string
  180. details:
  181. type: object
  182. nullable: true
  183. additionalProperties: true
  184. requestId:
  185. type: string
  186. format: uuid
  187. UserSummary:
  188. type: object
  189. additionalProperties: false
  190. required:
  191. - id
  192. - username
  193. - realName
  194. - organizationId
  195. - organizationName
  196. - roleCode
  197. - securityLevel
  198. - status
  199. - allowedModules
  200. properties:
  201. id:
  202. $ref: '#/StringId'
  203. username:
  204. type: string
  205. realName:
  206. type: string
  207. organizationId:
  208. allOf:
  209. - $ref: '#/StringId'
  210. nullable: true
  211. organizationName:
  212. type: string
  213. nullable: true
  214. roleCode:
  215. $ref: '#/RoleCode'
  216. securityLevel:
  217. $ref: '#/SecurityLevel'
  218. status:
  219. $ref: '#/EnabledStatus'
  220. allowedModules:
  221. type: array
  222. uniqueItems: true
  223. items:
  224. $ref: '#/AllowedModule'
  225. LoginRequest:
  226. type: object
  227. additionalProperties: false
  228. required: [username, password, keepSignedIn]
  229. properties:
  230. username:
  231. type: string
  232. minLength: 1
  233. password:
  234. type: string
  235. format: password
  236. minLength: 1
  237. writeOnly: true
  238. keepSignedIn:
  239. type: boolean
  240. LoginData:
  241. type: object
  242. additionalProperties: false
  243. required: [accessToken, tokenType, expiresIn, user]
  244. properties:
  245. accessToken:
  246. type: string
  247. tokenType:
  248. type: string
  249. enum: [Bearer]
  250. expiresIn:
  251. type: integer
  252. enum: [7200, 604800]
  253. user:
  254. $ref: '#/UserSummary'
  255. LoginResponse:
  256. type: object
  257. additionalProperties: false
  258. required: [code, message, data, requestId]
  259. properties:
  260. code:
  261. type: string
  262. enum: [OK]
  263. message:
  264. type: string
  265. enum: [success]
  266. data:
  267. $ref: '#/LoginData'
  268. requestId:
  269. type: string
  270. format: uuid
  271. UserResponse:
  272. type: object
  273. additionalProperties: false
  274. required: [code, message, data, requestId]
  275. properties:
  276. code:
  277. type: string
  278. enum: [OK]
  279. message:
  280. type: string
  281. enum: [success]
  282. data:
  283. $ref: '#/UserSummary'
  284. requestId:
  285. type: string
  286. format: uuid
  287. OrganizationNode:
  288. type: object
  289. additionalProperties: false
  290. required: [id, parentId, orgCode, orgName, orgPath, sortNo, status, children]
  291. properties:
  292. id:
  293. $ref: '#/StringId'
  294. parentId:
  295. allOf:
  296. - $ref: '#/StringId'
  297. nullable: true
  298. orgCode:
  299. type: string
  300. orgName:
  301. type: string
  302. orgPath:
  303. type: string
  304. sortNo:
  305. type: integer
  306. status:
  307. $ref: '#/EnabledStatus'
  308. children:
  309. type: array
  310. items:
  311. $ref: '#/OrganizationNode'
  312. OrganizationTreeResponse:
  313. type: object
  314. additionalProperties: false
  315. required: [code, message, data, requestId]
  316. properties:
  317. code:
  318. type: string
  319. enum: [OK]
  320. message:
  321. type: string
  322. enum: [success]
  323. data:
  324. type: array
  325. items:
  326. $ref: '#/OrganizationNode'
  327. requestId:
  328. type: string
  329. format: uuid
  330. UserPage:
  331. type: object
  332. additionalProperties: false
  333. required: [items, page, pageSize, total, totalPages]
  334. properties:
  335. items:
  336. type: array
  337. items:
  338. $ref: '#/UserSummary'
  339. page:
  340. type: integer
  341. minimum: 1
  342. pageSize:
  343. type: integer
  344. minimum: 1
  345. maximum: 100
  346. total:
  347. type: integer
  348. minimum: 0
  349. totalPages:
  350. type: integer
  351. minimum: 0
  352. UserPageResponse:
  353. type: object
  354. additionalProperties: false
  355. required: [code, message, data, requestId]
  356. properties:
  357. code:
  358. type: string
  359. enum: [OK]
  360. message:
  361. type: string
  362. enum: [success]
  363. data:
  364. $ref: '#/UserPage'
  365. requestId:
  366. type: string
  367. format: uuid
  368. EmptySuccessResponse:
  369. type: object
  370. additionalProperties: false
  371. required: [code, message, data, requestId]
  372. properties:
  373. code:
  374. type: string
  375. enum: [OK]
  376. message:
  377. type: string
  378. enum: [success]
  379. data:
  380. type: object
  381. additionalProperties: false
  382. requestId:
  383. type: string
  384. format: uuid
  385. CategoryNode:
  386. type: object
  387. additionalProperties: false
  388. required:
  389. - id
  390. - categoryCode
  391. - categoryName
  392. - categoryType
  393. - parentId
  394. - categoryPath
  395. - sortNo
  396. - documentCount
  397. - rowVersion
  398. - children
  399. properties:
  400. id:
  401. $ref: '#/StringId'
  402. categoryCode:
  403. type: string
  404. maxLength: 64
  405. categoryName:
  406. type: string
  407. maxLength: 128
  408. categoryType:
  409. $ref: '#/CategoryType'
  410. parentId:
  411. allOf:
  412. - $ref: '#/StringId'
  413. nullable: true
  414. categoryPath:
  415. type: string
  416. maxLength: 1000
  417. sortNo:
  418. type: integer
  419. documentCount:
  420. type: integer
  421. minimum: 0
  422. description: 当前用户可见的、该分类完整有效子树内的MAIN数量。
  423. rowVersion:
  424. type: integer
  425. minimum: 0
  426. children:
  427. type: array
  428. items:
  429. $ref: '#/CategoryNode'
  430. CreateCategoryRequest:
  431. type: object
  432. additionalProperties: false
  433. required: [categoryCode, categoryName, categoryType, parentId, sortNo]
  434. properties:
  435. categoryCode:
  436. type: string
  437. minLength: 1
  438. maxLength: 64
  439. categoryName:
  440. type: string
  441. minLength: 1
  442. maxLength: 128
  443. categoryType:
  444. $ref: '#/CategoryType'
  445. parentId:
  446. allOf:
  447. - $ref: '#/StringId'
  448. nullable: true
  449. sortNo:
  450. type: integer
  451. UpdateCategoryRequest:
  452. type: object
  453. additionalProperties: false
  454. required: [categoryName, categoryType, parentId, sortNo, rowVersion]
  455. properties:
  456. categoryName:
  457. type: string
  458. minLength: 1
  459. maxLength: 128
  460. categoryType:
  461. $ref: '#/CategoryType'
  462. parentId:
  463. allOf:
  464. - $ref: '#/StringId'
  465. nullable: true
  466. sortNo:
  467. type: integer
  468. rowVersion:
  469. type: integer
  470. minimum: 0
  471. CategoryTreeResponse:
  472. type: object
  473. additionalProperties: false
  474. required: [code, message, data, requestId]
  475. properties:
  476. code:
  477. type: string
  478. enum: [OK]
  479. message:
  480. type: string
  481. enum: [success]
  482. data:
  483. type: array
  484. items:
  485. $ref: '#/CategoryNode'
  486. requestId:
  487. type: string
  488. format: uuid
  489. CategoryResponse:
  490. type: object
  491. additionalProperties: false
  492. required: [code, message, data, requestId]
  493. properties:
  494. code:
  495. type: string
  496. enum: [OK]
  497. message:
  498. type: string
  499. enum: [success]
  500. data:
  501. $ref: '#/CategoryNode'
  502. requestId:
  503. type: string
  504. format: uuid
  505. DeleteCategoryData:
  506. type: object
  507. additionalProperties: false
  508. required: [id, deleted]
  509. properties:
  510. id:
  511. $ref: '#/StringId'
  512. deleted:
  513. type: boolean
  514. enum: [true]
  515. DeleteCategoryResponse:
  516. type: object
  517. additionalProperties: false
  518. required: [code, message, data, requestId]
  519. properties:
  520. code:
  521. type: string
  522. enum: [OK]
  523. message:
  524. type: string
  525. enum: [success]
  526. data:
  527. $ref: '#/DeleteCategoryData'
  528. requestId:
  529. type: string
  530. format: uuid
  531. PermissionSummary:
  532. type: object
  533. additionalProperties: false
  534. required: [organizationCount, userCount, inheritedFromMainPlan]
  535. properties:
  536. organizationCount:
  537. type: integer
  538. minimum: 0
  539. userCount:
  540. type: integer
  541. minimum: 0
  542. inheritedFromMainPlan:
  543. type: boolean
  544. DocumentSummary:
  545. type: object
  546. required:
  547. - id
  548. - documentName
  549. - summary
  550. - documentType
  551. - status
  552. - securityLevel
  553. - visibilityType
  554. - visibilitySummary
  555. - categoryId
  556. - categoryName
  557. - categoryPath
  558. - parentDocumentId
  559. - rootDocumentId
  560. - attachmentType
  561. - fileExtension
  562. - tags
  563. - childCount
  564. - attachmentCount
  565. - viewCount
  566. - downloadCount
  567. - createdByName
  568. - createdAt
  569. - updatedAt
  570. - rowVersion
  571. - allowedActions
  572. properties:
  573. id:
  574. $ref: '#/StringId'
  575. documentName:
  576. type: string
  577. summary:
  578. type: string
  579. nullable: true
  580. documentType:
  581. $ref: '#/DocumentType'
  582. status:
  583. $ref: '#/DocumentStatus'
  584. securityLevel:
  585. $ref: '#/SecurityLevel'
  586. visibilityType:
  587. $ref: '#/VisibilityType'
  588. visibilitySummary:
  589. type: string
  590. categoryId:
  591. allOf:
  592. - $ref: '#/StringId'
  593. nullable: true
  594. categoryName:
  595. type: string
  596. nullable: true
  597. categoryPath:
  598. type: string
  599. nullable: true
  600. parentDocumentId:
  601. allOf:
  602. - $ref: '#/StringId'
  603. nullable: true
  604. rootDocumentId:
  605. allOf:
  606. - $ref: '#/StringId'
  607. nullable: true
  608. attachmentType:
  609. allOf:
  610. - $ref: '#/AttachmentType'
  611. nullable: true
  612. fileExtension:
  613. type: string
  614. tags:
  615. type: array
  616. items:
  617. type: string
  618. childCount:
  619. type: integer
  620. minimum: 0
  621. attachmentCount:
  622. type: integer
  623. minimum: 0
  624. viewCount:
  625. type: integer
  626. minimum: 0
  627. downloadCount:
  628. type: integer
  629. minimum: 0
  630. createdByName:
  631. type: string
  632. nullable: true
  633. createdAt:
  634. $ref: '#/UtcDateTime'
  635. updatedAt:
  636. $ref: '#/UtcDateTime'
  637. rowVersion:
  638. type: integer
  639. minimum: 0
  640. allowedActions:
  641. type: array
  642. uniqueItems: true
  643. items:
  644. $ref: '#/AllowedAction'
  645. mountedPlanCount:
  646. type: integer
  647. minimum: 0
  648. description: 仅共享附件响应返回。
  649. DocumentDetail:
  650. allOf:
  651. - $ref: '#/DocumentSummary'
  652. - type: object
  653. required:
  654. - originalFileName
  655. - mimeType
  656. - fileSize
  657. - fileHash
  658. - permissionSummary
  659. properties:
  660. originalFileName:
  661. type: string
  662. mimeType:
  663. type: string
  664. nullable: true
  665. fileSize:
  666. type: integer
  667. minimum: 0
  668. fileHash:
  669. type: string
  670. pattern: '^[0-9a-fA-F]{64}$'
  671. permissionSummary:
  672. $ref: '#/PermissionSummary'
  673. AttachmentBindingSummary:
  674. allOf:
  675. - $ref: '#/DocumentSummary'
  676. - type: object
  677. required: [bindingId, bindingSortNo, mountedPlanCount]
  678. properties:
  679. bindingId:
  680. $ref: '#/StringId'
  681. bindingSortNo:
  682. type: integer
  683. mountedPlanCount:
  684. type: integer
  685. minimum: 0
  686. DocumentPage:
  687. type: object
  688. additionalProperties: false
  689. required: [items, page, pageSize, total, totalPages]
  690. properties:
  691. items:
  692. type: array
  693. items:
  694. $ref: '#/DocumentSummary'
  695. page:
  696. type: integer
  697. minimum: 1
  698. pageSize:
  699. type: integer
  700. minimum: 1
  701. maximum: 100
  702. total:
  703. type: integer
  704. minimum: 0
  705. totalPages:
  706. type: integer
  707. minimum: 0
  708. AttachmentBindingPage:
  709. type: object
  710. additionalProperties: false
  711. required: [items, page, pageSize, total, totalPages]
  712. properties:
  713. items:
  714. type: array
  715. items:
  716. $ref: '#/AttachmentBindingSummary'
  717. page:
  718. type: integer
  719. minimum: 1
  720. pageSize:
  721. type: integer
  722. minimum: 1
  723. maximum: 100
  724. total:
  725. type: integer
  726. minimum: 0
  727. totalPages:
  728. type: integer
  729. minimum: 0
  730. MainPlanBrief:
  731. type: object
  732. additionalProperties: false
  733. required: [id, documentName, categoryName, securityLevel]
  734. properties:
  735. id:
  736. $ref: '#/StringId'
  737. documentName:
  738. type: string
  739. categoryName:
  740. type: string
  741. nullable: true
  742. securityLevel:
  743. $ref: '#/SecurityLevel'
  744. MainPlanBriefCollection:
  745. type: object
  746. additionalProperties: false
  747. required: [items, total]
  748. properties:
  749. items:
  750. type: array
  751. items:
  752. $ref: '#/MainPlanBrief'
  753. total:
  754. type: integer
  755. minimum: 0
  756. DocumentPageResponse:
  757. type: object
  758. additionalProperties: false
  759. required: [code, message, data, requestId]
  760. properties:
  761. code:
  762. type: string
  763. enum: [OK]
  764. message:
  765. type: string
  766. enum: [success]
  767. data:
  768. $ref: '#/DocumentPage'
  769. requestId:
  770. type: string
  771. format: uuid
  772. DocumentDetailResponse:
  773. type: object
  774. additionalProperties: false
  775. required: [code, message, data, requestId]
  776. properties:
  777. code:
  778. type: string
  779. enum: [OK]
  780. message:
  781. type: string
  782. enum: [success]
  783. data:
  784. $ref: '#/DocumentDetail'
  785. requestId:
  786. type: string
  787. format: uuid
  788. AttachmentBindingPageResponse:
  789. type: object
  790. additionalProperties: false
  791. required: [code, message, data, requestId]
  792. properties:
  793. code:
  794. type: string
  795. enum: [OK]
  796. message:
  797. type: string
  798. enum: [success]
  799. data:
  800. $ref: '#/AttachmentBindingPage'
  801. requestId:
  802. type: string
  803. format: uuid
  804. MainPlanBriefCollectionResponse:
  805. type: object
  806. additionalProperties: false
  807. required: [code, message, data, requestId]
  808. properties:
  809. code:
  810. type: string
  811. enum: [OK]
  812. message:
  813. type: string
  814. enum: [success]
  815. data:
  816. $ref: '#/MainPlanBriefCollection'
  817. requestId:
  818. type: string
  819. format: uuid
  820. MainDocumentCreateMetadata:
  821. type: object
  822. additionalProperties: false
  823. required: [documentName, documentType, summary, categoryId, securityLevel, tags]
  824. properties:
  825. documentName: {type: string, minLength: 1, maxLength: 255}
  826. documentType: {type: string, enum: [MAIN]}
  827. summary: {type: string, nullable: true}
  828. categoryId: {$ref: '#/StringId'}
  829. securityLevel: {$ref: '#/SecurityLevel'}
  830. overwriteDocumentId:
  831. allOf: [{$ref: '#/StringId'}]
  832. description: 仅在用户确认覆盖同名主案后提交,并必须与rowVersion同时出现。
  833. rowVersion:
  834. type: integer
  835. minimum: 0
  836. description: 被覆盖文档的当前版本;仅与overwriteDocumentId同时提交。
  837. tags:
  838. type: array
  839. maxItems: 50
  840. items: {type: string, minLength: 1, maxLength: 64}
  841. SubPlanCreateMetadata:
  842. type: object
  843. additionalProperties: false
  844. required: [documentName, documentType, summary, parentDocumentId, securityLevel, tags]
  845. properties:
  846. documentName: {type: string, minLength: 1, maxLength: 255}
  847. documentType: {type: string, enum: [SUB_PLAN]}
  848. summary: {type: string, nullable: true}
  849. parentDocumentId: {$ref: '#/StringId'}
  850. securityLevel: {$ref: '#/SecurityLevel'}
  851. overwriteDocumentId:
  852. allOf: [{$ref: '#/StringId'}]
  853. description: 仅在用户确认覆盖同一主案下同名子案后提交,并必须与rowVersion同时出现。
  854. rowVersion:
  855. type: integer
  856. minimum: 0
  857. description: 被覆盖文档的当前版本;仅与overwriteDocumentId同时提交。
  858. tags:
  859. type: array
  860. maxItems: 50
  861. items: {type: string, minLength: 1, maxLength: 64}
  862. DocumentCreateMetadata:
  863. oneOf:
  864. - $ref: '#/MainDocumentCreateMetadata'
  865. - $ref: '#/SubPlanCreateMetadata'
  866. discriminator:
  867. propertyName: documentType
  868. AttachmentCreateMetadata:
  869. type: object
  870. additionalProperties: false
  871. required: [documentName, attachmentType, summary, tags]
  872. properties:
  873. documentName: {type: string, minLength: 1, maxLength: 255}
  874. attachmentType: {$ref: '#/AttachmentType'}
  875. summary: {type: string, nullable: true}
  876. tags:
  877. type: array
  878. maxItems: 50
  879. items: {type: string, minLength: 1, maxLength: 64}
  880. MainDocumentUpdateRequest:
  881. type: object
  882. additionalProperties: false
  883. required: [documentName, summary, categoryId, securityLevel, tags, rowVersion]
  884. properties:
  885. documentName: {type: string, minLength: 1, maxLength: 255}
  886. summary: {type: string, nullable: true}
  887. categoryId: {$ref: '#/StringId'}
  888. securityLevel: {$ref: '#/SecurityLevel'}
  889. tags:
  890. type: array
  891. maxItems: 50
  892. items: {type: string, minLength: 1, maxLength: 64}
  893. rowVersion: {type: integer, minimum: 0}
  894. SubPlanUpdateRequest:
  895. type: object
  896. additionalProperties: false
  897. required: [documentName, summary, securityLevel, tags, rowVersion]
  898. properties:
  899. documentName: {type: string, minLength: 1, maxLength: 255}
  900. summary: {type: string, nullable: true}
  901. securityLevel: {$ref: '#/SecurityLevel'}
  902. tags:
  903. type: array
  904. maxItems: 50
  905. items: {type: string, minLength: 1, maxLength: 64}
  906. rowVersion: {type: integer, minimum: 0}
  907. UpdateDocumentRequest:
  908. oneOf:
  909. - $ref: '#/MainDocumentUpdateRequest'
  910. - $ref: '#/SubPlanUpdateRequest'
  911. UpdateAttachmentRequest:
  912. type: object
  913. additionalProperties: false
  914. required: [documentName, attachmentType, summary, tags, rowVersion]
  915. properties:
  916. documentName: {type: string, minLength: 1, maxLength: 255}
  917. attachmentType: {$ref: '#/AttachmentType'}
  918. summary: {type: string, nullable: true}
  919. tags:
  920. type: array
  921. maxItems: 50
  922. items: {type: string, minLength: 1, maxLength: 64}
  923. rowVersion: {type: integer, minimum: 0}
  924. DeleteDocumentData:
  925. type: object
  926. additionalProperties: false
  927. required: [id, deleted]
  928. properties:
  929. id: {$ref: '#/StringId'}
  930. deleted: {type: boolean, enum: [true]}
  931. DeleteDocumentResponse:
  932. type: object
  933. additionalProperties: false
  934. required: [code, message, data, requestId]
  935. properties:
  936. code: {type: string, enum: [OK]}
  937. message: {type: string, enum: [success]}
  938. data: {$ref: '#/DeleteDocumentData'}
  939. requestId: {type: string, format: uuid}
  940. BatchImportMultipart:
  941. type: object
  942. additionalProperties: false
  943. required: [files, items]
  944. properties:
  945. files:
  946. type: array
  947. minItems: 1
  948. items: {type: string, format: binary}
  949. description: 重复files字段,顺序与items数组严格对应。
  950. items:
  951. type: string
  952. description: 文档或附件metadata对象数组的JSON字符串。
  953. BatchImportItem:
  954. type: object
  955. additionalProperties: false
  956. required: [index, originalFileName, success]
  957. properties:
  958. index: {type: integer, minimum: 0}
  959. originalFileName: {type: string}
  960. success: {type: boolean}
  961. document: {$ref: '#/DocumentDetail'}
  962. errorCode: {type: string}
  963. errorMessage: {type: string}
  964. BatchImportData:
  965. type: object
  966. additionalProperties: false
  967. required: [total, successCount, failureCount, items]
  968. properties:
  969. total: {type: integer, minimum: 0}
  970. successCount: {type: integer, minimum: 0}
  971. failureCount: {type: integer, minimum: 0}
  972. items:
  973. type: array
  974. items: {$ref: '#/BatchImportItem'}
  975. BatchImportResponse:
  976. type: object
  977. additionalProperties: false
  978. required: [code, message, data, requestId]
  979. properties:
  980. code: {type: string, enum: [OK]}
  981. message: {type: string, enum: [success]}
  982. data: {$ref: '#/BatchImportData'}
  983. requestId: {type: string, format: uuid}
  984. BindAttachmentsRequest:
  985. type: object
  986. additionalProperties: false
  987. required: [attachmentIds, mainPlanRowVersion]
  988. properties:
  989. attachmentIds:
  990. type: array
  991. minItems: 1
  992. items: {$ref: '#/StringId'}
  993. mainPlanRowVersion:
  994. type: integer
  995. minimum: 0
  996. BindAttachmentsData:
  997. type: object
  998. additionalProperties: false
  999. required: [createdCount, existingCount, attachmentCount, mainPlanRowVersion]
  1000. properties:
  1001. createdCount: {type: integer, minimum: 0}
  1002. existingCount: {type: integer, minimum: 0}
  1003. attachmentCount: {type: integer, minimum: 0}
  1004. mainPlanRowVersion: {type: integer, minimum: 0}
  1005. BindAttachmentsResponse:
  1006. type: object
  1007. additionalProperties: false
  1008. required: [code, message, data, requestId]
  1009. properties:
  1010. code: {type: string, enum: [OK]}
  1011. message: {type: string, enum: [success]}
  1012. data: {$ref: '#/BindAttachmentsData'}
  1013. requestId: {type: string, format: uuid}
  1014. UnbindAttachmentData:
  1015. type: object
  1016. additionalProperties: false
  1017. required: [attachmentCount, mainPlanRowVersion]
  1018. properties:
  1019. attachmentCount: {type: integer, minimum: 0}
  1020. mainPlanRowVersion: {type: integer, minimum: 0}
  1021. UnbindAttachmentResponse:
  1022. type: object
  1023. additionalProperties: false
  1024. required: [code, message, data, requestId]
  1025. properties:
  1026. code: {type: string, enum: [OK]}
  1027. message: {type: string, enum: [success]}
  1028. data: {$ref: '#/UnbindAttachmentData'}
  1029. requestId: {type: string, format: uuid}
  1030. PermissionEntry:
  1031. type: object
  1032. additionalProperties: false
  1033. required:
  1034. - id
  1035. - subjectType
  1036. - subjectId
  1037. - subjectName
  1038. - canView
  1039. - canDownload
  1040. - canEdit
  1041. - canManagePermission
  1042. - canDelete
  1043. properties:
  1044. id: {$ref: '#/StringId'}
  1045. subjectType: {$ref: '#/SubjectType'}
  1046. subjectId: {$ref: '#/StringId'}
  1047. subjectName: {type: string}
  1048. canView: {type: boolean}
  1049. canDownload: {type: boolean}
  1050. canEdit: {type: boolean}
  1051. canManagePermission: {type: boolean}
  1052. canDelete: {type: boolean}
  1053. SavePermissionEntry:
  1054. type: object
  1055. additionalProperties: false
  1056. required:
  1057. - subjectType
  1058. - subjectId
  1059. - canView
  1060. - canDownload
  1061. - canEdit
  1062. - canManagePermission
  1063. - canDelete
  1064. properties:
  1065. subjectType: {$ref: '#/SubjectType'}
  1066. subjectId: {$ref: '#/StringId'}
  1067. canView: {type: boolean}
  1068. canDownload: {type: boolean}
  1069. canEdit: {type: boolean}
  1070. canManagePermission: {type: boolean}
  1071. canDelete: {type: boolean}
  1072. SavePermissionsRequest:
  1073. type: object
  1074. additionalProperties: false
  1075. required: [visibilityType, documentRowVersion, entries]
  1076. properties:
  1077. visibilityType: {$ref: '#/VisibilityType'}
  1078. documentRowVersion: {type: integer, minimum: 0}
  1079. entries:
  1080. type: array
  1081. items: {$ref: '#/SavePermissionEntry'}
  1082. description: ALL_AUTHENTICATED必须为空;ORGANIZATION至少一个ORG;CUSTOM可为空。
  1083. PermissionDetail:
  1084. type: object
  1085. additionalProperties: false
  1086. required:
  1087. - documentId
  1088. - sourceDocumentId
  1089. - inherited
  1090. - visibilityType
  1091. - documentRowVersion
  1092. - entries
  1093. properties:
  1094. documentId: {$ref: '#/StringId'}
  1095. sourceDocumentId: {$ref: '#/StringId'}
  1096. inherited: {type: boolean}
  1097. visibilityType: {$ref: '#/VisibilityType'}
  1098. documentRowVersion: {type: integer, minimum: 0}
  1099. entries:
  1100. type: array
  1101. items: {$ref: '#/PermissionEntry'}
  1102. PermissionDetailResponse:
  1103. type: object
  1104. additionalProperties: false
  1105. required: [code, message, data, requestId]
  1106. properties:
  1107. code: {type: string, enum: [OK]}
  1108. message: {type: string, enum: [success]}
  1109. data: {$ref: '#/PermissionDetail'}
  1110. requestId: {type: string, format: uuid}
  1111. AuditGranularity:
  1112. type: string
  1113. enum: [DAY, WEEK, MONTH]
  1114. AuditLogSummary:
  1115. type: object
  1116. additionalProperties: false
  1117. required:
  1118. - id
  1119. - username
  1120. - realName
  1121. - organizationName
  1122. - actionType
  1123. - targetType
  1124. - targetId
  1125. - targetName
  1126. - operationResult
  1127. - failureReason
  1128. - clientIp
  1129. - requestId
  1130. - createdAt
  1131. properties:
  1132. id: {$ref: '#/StringId'}
  1133. username: {type: string, nullable: true}
  1134. realName: {type: string, nullable: true}
  1135. organizationName: {type: string, nullable: true}
  1136. actionType: {$ref: '#/AuditAction'}
  1137. targetType:
  1138. allOf: [{$ref: '#/AuditTarget'}]
  1139. nullable: true
  1140. targetId:
  1141. allOf: [{$ref: '#/StringId'}]
  1142. nullable: true
  1143. targetName: {type: string, nullable: true}
  1144. operationResult: {$ref: '#/AuditResult'}
  1145. failureReason: {type: string, nullable: true}
  1146. clientIp: {type: string, nullable: true}
  1147. requestId: {type: string, nullable: true}
  1148. createdAt: {$ref: '#/UtcDateTime'}
  1149. AuditLogPage:
  1150. type: object
  1151. additionalProperties: false
  1152. required: [items, page, pageSize, total, totalPages]
  1153. properties:
  1154. items: {type: array, items: {$ref: '#/AuditLogSummary'}}
  1155. page: {type: integer, minimum: 1}
  1156. pageSize: {type: integer, minimum: 1, maximum: 100}
  1157. total: {type: integer, minimum: 0}
  1158. totalPages: {type: integer, minimum: 0}
  1159. AuditLogPageResponse:
  1160. type: object
  1161. additionalProperties: false
  1162. required: [code, message, data, requestId]
  1163. properties:
  1164. code: {type: string, enum: [OK]}
  1165. message: {type: string, enum: [success]}
  1166. data: {$ref: '#/AuditLogPage'}
  1167. requestId: {type: string, format: uuid}
  1168. DocumentStatistics:
  1169. type: object
  1170. additionalProperties: false
  1171. required: [planDocumentCount, mainPlanCount, subPlanCount, attachmentCount, todayViewerCount]
  1172. properties:
  1173. planDocumentCount: {type: integer, minimum: 0}
  1174. mainPlanCount: {type: integer, minimum: 0}
  1175. subPlanCount: {type: integer, minimum: 0}
  1176. attachmentCount: {type: integer, minimum: 0}
  1177. todayViewerCount: {type: integer, minimum: 0}
  1178. DocumentStatisticsResponse:
  1179. type: object
  1180. additionalProperties: false
  1181. required: [code, message, data, requestId]
  1182. properties:
  1183. code: {type: string, enum: [OK]}
  1184. message: {type: string, enum: [success]}
  1185. data: {$ref: '#/DocumentStatistics'}
  1186. requestId: {type: string, format: uuid}
  1187. AuditTrendItem:
  1188. type: object
  1189. additionalProperties: false
  1190. required: [period, operationCount]
  1191. properties:
  1192. period: {type: string}
  1193. operationCount: {type: integer, minimum: 0}
  1194. AuditTrendData:
  1195. type: object
  1196. additionalProperties: false
  1197. required: [items]
  1198. properties:
  1199. items: {type: array, items: {$ref: '#/AuditTrendItem'}}
  1200. AuditTrendResponse:
  1201. type: object
  1202. additionalProperties: false
  1203. required: [code, message, data, requestId]
  1204. properties:
  1205. code: {type: string, enum: [OK]}
  1206. message: {type: string, enum: [success]}
  1207. data: {$ref: '#/AuditTrendData'}
  1208. requestId: {type: string, format: uuid}
  1209. AuditActionStatisticsItem:
  1210. type: object
  1211. additionalProperties: false
  1212. required: [actionType, count]
  1213. properties:
  1214. actionType: {$ref: '#/AuditAction'}
  1215. count: {type: integer, minimum: 0}
  1216. AuditActionStatisticsData:
  1217. type: object
  1218. additionalProperties: false
  1219. required: [items]
  1220. properties:
  1221. items: {type: array, items: {$ref: '#/AuditActionStatisticsItem'}}
  1222. AuditActionStatisticsResponse:
  1223. type: object
  1224. additionalProperties: false
  1225. required: [code, message, data, requestId]
  1226. properties:
  1227. code: {type: string, enum: [OK]}
  1228. message: {type: string, enum: [success]}
  1229. data: {$ref: '#/AuditActionStatisticsData'}
  1230. requestId: {type: string, format: uuid}
  1231. AuditUserStatisticsItem:
  1232. type: object
  1233. additionalProperties: false
  1234. required: [userId, realName, organizationName, operationCount]
  1235. properties:
  1236. userId: {$ref: '#/StringId'}
  1237. realName: {type: string, nullable: true}
  1238. organizationName: {type: string, nullable: true}
  1239. operationCount: {type: integer, minimum: 0}
  1240. AuditUserStatisticsData:
  1241. type: object
  1242. additionalProperties: false
  1243. required: [items]
  1244. properties:
  1245. items: {type: array, items: {$ref: '#/AuditUserStatisticsItem'}}
  1246. AuditUserStatisticsResponse:
  1247. type: object
  1248. additionalProperties: false
  1249. required: [code, message, data, requestId]
  1250. properties:
  1251. code: {type: string, enum: [OK]}
  1252. message: {type: string, enum: [success]}
  1253. data: {$ref: '#/AuditUserStatisticsData'}
  1254. requestId: {type: string, format: uuid}
  1255. DeletedBySnapshot:
  1256. type: object
  1257. additionalProperties: false
  1258. required: [userId, username, realName, organizationName]
  1259. properties:
  1260. userId:
  1261. allOf:
  1262. - $ref: '#/StringId'
  1263. nullable: true
  1264. username: {type: string, nullable: true}
  1265. realName: {type: string, nullable: true}
  1266. organizationName: {type: string, nullable: true}
  1267. RecycleBinDocumentSummary:
  1268. type: object
  1269. additionalProperties: false
  1270. required:
  1271. - id
  1272. - documentName
  1273. - documentType
  1274. - originalFileName
  1275. - categoryId
  1276. - categoryName
  1277. - parentDocumentId
  1278. - securityLevel
  1279. - documentStatus
  1280. - deletedAt
  1281. - updatedBy
  1282. - updatedByName
  1283. - deletedBy
  1284. - rowVersion
  1285. properties:
  1286. id: {$ref: '#/StringId'}
  1287. documentName: {type: string}
  1288. documentType: {$ref: '#/DocumentType'}
  1289. originalFileName: {type: string}
  1290. categoryId:
  1291. allOf:
  1292. - $ref: '#/StringId'
  1293. nullable: true
  1294. categoryName: {type: string, nullable: true}
  1295. parentDocumentId:
  1296. allOf:
  1297. - $ref: '#/StringId'
  1298. nullable: true
  1299. securityLevel: {$ref: '#/SecurityLevel'}
  1300. documentStatus: {$ref: '#/DocumentStatus'}
  1301. deletedAt: {$ref: '#/UtcDateTime'}
  1302. updatedBy:
  1303. allOf:
  1304. - $ref: '#/StringId'
  1305. nullable: true
  1306. updatedByName: {type: string, nullable: true}
  1307. deletedBy:
  1308. allOf:
  1309. - $ref: '#/DeletedBySnapshot'
  1310. nullable: true
  1311. rowVersion: {type: integer, minimum: 0}
  1312. RecycleBinDocumentPage:
  1313. type: object
  1314. additionalProperties: false
  1315. required: [items, page, pageSize, total, totalPages]
  1316. properties:
  1317. items:
  1318. type: array
  1319. items: {$ref: '#/RecycleBinDocumentSummary'}
  1320. page: {type: integer, minimum: 1}
  1321. pageSize: {type: integer, minimum: 1, maximum: 100}
  1322. total: {type: integer, minimum: 0}
  1323. totalPages: {type: integer, minimum: 0}
  1324. RecycleBinDocumentPageResponse:
  1325. type: object
  1326. additionalProperties: false
  1327. required: [code, message, data, requestId]
  1328. properties:
  1329. code: {type: string, enum: [OK]}
  1330. message: {type: string, enum: [success]}
  1331. data: {$ref: '#/RecycleBinDocumentPage'}
  1332. requestId: {type: string, format: uuid}
  1333. RestoreDocumentRequest:
  1334. type: object
  1335. additionalProperties: false
  1336. required: [rowVersion]
  1337. properties:
  1338. rowVersion: {type: integer, minimum: 0}
  1339. RestoredDocument:
  1340. allOf:
  1341. - $ref: '#/DocumentSummary'
  1342. - type: object
  1343. required: [originalFileName, mimeType, fileSize, permissionSummary]
  1344. properties:
  1345. originalFileName: {type: string}
  1346. mimeType: {type: string, nullable: true}
  1347. fileSize: {type: integer, minimum: 0}
  1348. permissionSummary: {$ref: '#/PermissionSummary'}
  1349. mountedPlanCount: {type: integer, minimum: 0}
  1350. RestoreDocumentResult:
  1351. type: object
  1352. additionalProperties: false
  1353. required:
  1354. - document
  1355. - restoredPermissionCount
  1356. - skippedPermissionCount
  1357. - restoredBindingCount
  1358. - skippedBindingCount
  1359. properties:
  1360. document: {$ref: '#/RestoredDocument'}
  1361. restoredPermissionCount: {type: integer, minimum: 0}
  1362. skippedPermissionCount: {type: integer, minimum: 0}
  1363. restoredBindingCount: {type: integer, minimum: 0}
  1364. skippedBindingCount: {type: integer, minimum: 0}
  1365. RestoreDocumentResponse:
  1366. type: object
  1367. additionalProperties: false
  1368. required: [code, message, data, requestId]
  1369. properties:
  1370. code: {type: string, enum: [OK]}
  1371. message: {type: string, enum: [success]}
  1372. data: {$ref: '#/RestoreDocumentResult'}
  1373. requestId: {type: string, format: uuid}
  1374. DictionaryOption:
  1375. type: object
  1376. additionalProperties: false
  1377. required: [code, label, sortNo]
  1378. properties:
  1379. code: {type: string, minLength: 1}
  1380. label: {type: string, minLength: 1}
  1381. sortNo: {type: integer, minimum: 0}
  1382. DictionaryOptionList:
  1383. type: array
  1384. items: {$ref: '#/DictionaryOption'}
  1385. UiDictionaryGroups:
  1386. type: object
  1387. additionalProperties: false
  1388. required:
  1389. - roleCodes
  1390. - allowedModules
  1391. - documentTypes
  1392. - documentStatuses
  1393. - securityLevels
  1394. - visibilityTypes
  1395. - attachmentTypes
  1396. - subjectTypes
  1397. - allowedActions
  1398. - categoryTypes
  1399. - enabledStatuses
  1400. - auditResults
  1401. - auditActions
  1402. - auditTargets
  1403. properties:
  1404. roleCodes: {$ref: '#/DictionaryOptionList'}
  1405. allowedModules: {$ref: '#/DictionaryOptionList'}
  1406. documentTypes: {$ref: '#/DictionaryOptionList'}
  1407. documentStatuses: {$ref: '#/DictionaryOptionList'}
  1408. securityLevels: {$ref: '#/DictionaryOptionList'}
  1409. visibilityTypes: {$ref: '#/DictionaryOptionList'}
  1410. attachmentTypes: {$ref: '#/DictionaryOptionList'}
  1411. subjectTypes: {$ref: '#/DictionaryOptionList'}
  1412. allowedActions: {$ref: '#/DictionaryOptionList'}
  1413. categoryTypes: {$ref: '#/DictionaryOptionList'}
  1414. enabledStatuses: {$ref: '#/DictionaryOptionList'}
  1415. auditResults: {$ref: '#/DictionaryOptionList'}
  1416. auditActions: {$ref: '#/DictionaryOptionList'}
  1417. auditTargets: {$ref: '#/DictionaryOptionList'}
  1418. UiDictionaries:
  1419. type: object
  1420. additionalProperties: false
  1421. required: [version, locale, dictionaries]
  1422. properties:
  1423. version:
  1424. type: string
  1425. pattern: '^[0-9]{4}\.[0-9]+$'
  1426. example: '2026.1'
  1427. locale:
  1428. type: string
  1429. example: zh-CN
  1430. dictionaries: {$ref: '#/UiDictionaryGroups'}
  1431. UiDictionariesResponse:
  1432. type: object
  1433. additionalProperties: false
  1434. required: [code, message, data, requestId]
  1435. properties:
  1436. code: {type: string, enum: [OK]}
  1437. message: {type: string, enum: [success]}
  1438. data: {$ref: '#/UiDictionaries'}
  1439. requestId: {type: string, format: uuid}