schemas.yaml 34 KB

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