schemas.yaml 65 KB

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