schemas.yaml 89 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193
  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. - BACKUP_CREATE
  89. AuditTarget:
  90. type: string
  91. enum:
  92. - AUTH
  93. - CATEGORY
  94. - DOCUMENT
  95. - ATTACHMENT
  96. - PERMISSION
  97. - ATTACHMENT_BINDING
  98. - ORGANIZATION
  99. - USER
  100. - ROLE
  101. - IP_ENTRY
  102. - BACKUP
  103. PageResult:
  104. type: object
  105. required: [items, page, pageSize, total, totalPages]
  106. properties:
  107. items:
  108. type: array
  109. items: {}
  110. page:
  111. type: integer
  112. minimum: 1
  113. default: 1
  114. pageSize:
  115. type: integer
  116. minimum: 1
  117. maximum: 100
  118. default: 20
  119. total:
  120. type: integer
  121. minimum: 0
  122. totalPages:
  123. type: integer
  124. minimum: 0
  125. HealthData:
  126. type: object
  127. additionalProperties: false
  128. required: [service, status]
  129. properties:
  130. service:
  131. type: string
  132. enum: [dms]
  133. status:
  134. type: string
  135. enum: [UP]
  136. HealthResponse:
  137. type: object
  138. additionalProperties: false
  139. required: [code, message, data, requestId]
  140. properties:
  141. code:
  142. type: string
  143. enum: [OK]
  144. message:
  145. type: string
  146. enum: [success]
  147. data:
  148. $ref: '#/HealthData'
  149. requestId:
  150. type: string
  151. format: uuid
  152. ErrorResponse:
  153. type: object
  154. additionalProperties: false
  155. required: [code, message, details, requestId]
  156. properties:
  157. code:
  158. type: string
  159. enum:
  160. - INVALID_ARGUMENT
  161. - INVALID_CREDENTIALS
  162. - TOKEN_INVALID
  163. - TOKEN_EXPIRED
  164. - USER_DISABLED
  165. - AUTH_VERSION_MISMATCH
  166. - FORBIDDEN
  167. - SECURITY_LEVEL_FORBIDDEN
  168. - DOCUMENT_VIEW_FORBIDDEN
  169. - DOCUMENT_DOWNLOAD_FORBIDDEN
  170. - RESOURCE_NOT_FOUND
  171. - FILE_NOT_FOUND
  172. - UNSUPPORTED_FILE_TYPE
  173. - PREVIEW_UNAVAILABLE
  174. - PAYLOAD_TOO_LARGE
  175. - BATCH_MANIFEST_MISMATCH
  176. - DATA_VERSION_CONFLICT
  177. - DOCUMENT_NAME_CONFLICT
  178. - CATEGORY_IN_USE
  179. - CATEGORY_NOT_LEAF
  180. - MAIN_PLAN_HAS_CHILDREN
  181. - ATTACHMENT_IN_USE
  182. - ATTACHMENT_HAS_NO_ACL
  183. - SUB_PLAN_PERMISSION_INHERITED
  184. - DUPLICATE_PERMISSION_SUBJECT
  185. - MAIN_PLAN_NOT_FOUND
  186. - INTERNAL_ERROR
  187. - DOCUMENT_NOT_DELETED
  188. - FILE_INTEGRITY_MISMATCH
  189. - FILE_PATH_INVALID
  190. - RESTORE_FILE_CHANGED
  191. - RESTORE_CATEGORY_INVALID
  192. - RESTORE_PARENT_INVALID
  193. - RESTORE_RELATION_CONFLICT
  194. - DOCUMENT_NOT_IN_MOVE_SCOPE
  195. - ORGANIZATION_IN_USE
  196. - USER_SELF_PROTECTION
  197. - CATEGORY_FLAT_MODE_CONFLICT
  198. - PREVIEW_CONVERTER_UNAVAILABLE
  199. - PREVIEW_CONVERSION_TIMEOUT
  200. - PREVIEW_CONVERSION_FAILED
  201. - BACKUP_RUNNING
  202. - BACKUP_TARGET_UNAVAILABLE
  203. - BACKUP_TOOL_MISSING
  204. - BACKUP_FAILED
  205. message:
  206. type: string
  207. details:
  208. type: object
  209. nullable: true
  210. additionalProperties: true
  211. requestId:
  212. type: string
  213. format: uuid
  214. UserSummary:
  215. type: object
  216. additionalProperties: false
  217. required:
  218. - id
  219. - username
  220. - realName
  221. - organizationId
  222. - organizationName
  223. - roleCode
  224. - roleId
  225. - roleName
  226. - securityLevel
  227. - status
  228. - allowedModules
  229. - authVersion
  230. - rowVersion
  231. - lastLoginAt
  232. - lastLoginIp
  233. - uiTheme
  234. - permCategoryEdit
  235. - permOrgEdit
  236. - permUserEdit
  237. - permSystemManage
  238. - permAuditLog
  239. - permRoleEdit
  240. - permUpload
  241. - managedOrgId
  242. properties:
  243. id:
  244. $ref: '#/StringId'
  245. username:
  246. type: string
  247. realName:
  248. type: string
  249. organizationId:
  250. allOf:
  251. - $ref: '#/StringId'
  252. nullable: true
  253. organizationName:
  254. type: string
  255. nullable: true
  256. roleCode:
  257. $ref: '#/RoleCode'
  258. roleId:
  259. allOf:
  260. - $ref: '#/StringId'
  261. nullable: true
  262. description: 自定义角色ID;ADMIN恒为空。
  263. roleName:
  264. type: string
  265. nullable: true
  266. description: 自定义角色名称;角色被删除后为null。
  267. securityLevel:
  268. $ref: '#/SecurityLevel'
  269. status:
  270. $ref: '#/EnabledStatus'
  271. allowedModules:
  272. type: array
  273. uniqueItems: true
  274. items:
  275. $ref: '#/AllowedModule'
  276. authVersion:
  277. type: integer
  278. minimum: 0
  279. rowVersion:
  280. type: integer
  281. minimum: 0
  282. lastLoginAt:
  283. allOf:
  284. - $ref: '#/UtcDateTime'
  285. nullable: true
  286. lastLoginIp:
  287. type: string
  288. nullable: true
  289. uiTheme:
  290. type: string
  291. enum: [blue, red, green]
  292. description: 界面主题偏好(契约1.20,账号级漫游);存量与缺省为blue。
  293. permCategoryEdit:
  294. type: boolean
  295. description: 分类编辑管理位;值取自生效角色(显式角色活跃且启用时优先,否则回退默认角色),内置admin恒为true。
  296. permOrgEdit:
  297. type: boolean
  298. description: 机构编辑管理位;值取自生效角色。
  299. permUserEdit:
  300. type: boolean
  301. description: 用户编辑管理位;值取自生效角色。
  302. permSystemManage:
  303. type: boolean
  304. description: 系统管理管理位(契约1.23);值取自生效角色,内置admin恒为true。
  305. permAuditLog:
  306. type: boolean
  307. description: 日志审计管理位(契约1.23);值取自生效角色,内置admin恒为true。
  308. permRoleEdit:
  309. type: boolean
  310. description: 角色编辑管理位(契约1.25);值取自生效角色,内置admin恒为true。
  311. permUpload:
  312. type: boolean
  313. description: 上传位(契约1.31);生效角色方案权限矩阵任一 OWN 行 canUpload 为 true 即为 true,内置admin恒为true;上传/批量导入接口按此判定。
  314. managedOrgId:
  315. type: string
  316. nullable: true
  317. description: 用户级管理范围(契约1.30);为机构ID(固定锚点)、"SELF"(跟随该用户所在机构,落库哨兵0)或null(全局),内置admin恒为null。实际生效范围以生效角色锚点为准,角色锚点为"SELF"(跟随用户设置)时才回落本设置。
  318. LoginRequest:
  319. type: object
  320. additionalProperties: false
  321. required: [username, password, keepSignedIn]
  322. properties:
  323. username:
  324. type: string
  325. minLength: 1
  326. password:
  327. type: string
  328. format: password
  329. minLength: 1
  330. writeOnly: true
  331. keepSignedIn:
  332. type: boolean
  333. captchaId:
  334. type: string
  335. description: 图片验证码标识(安全需求4);DMS_CAPTCHA_ENABLED开启时必填(五键),关闭时不得携带(三键)
  336. captchaCode:
  337. type: string
  338. description: 图片验证码字符(安全需求4,忽略大小写);开关开启时必填
  339. LoginData:
  340. type: object
  341. additionalProperties: false
  342. required: [accessToken, tokenType, expiresIn, idleLogoutMinutes, user]
  343. properties:
  344. accessToken:
  345. type: string
  346. tokenType:
  347. type: string
  348. enum: [Bearer]
  349. expiresIn:
  350. type: integer
  351. description: 访问令牌有效期秒数;keepSignedIn=false取环境变量DMS_JWT_EXPIRES_SECONDS(缺省3600),keepSignedIn=true固定604800。
  352. idleLogoutMinutes:
  353. type: integer
  354. minimum: 0
  355. description: 页面空闲自动登出分钟数(契约1.29);取环境变量DMS_IDLE_LOGOUT_MINUTES(缺省5),0表示关闭。
  356. user:
  357. $ref: '#/UserSummary'
  358. LoginResponse:
  359. type: object
  360. additionalProperties: false
  361. required: [code, message, data, requestId]
  362. properties:
  363. code:
  364. type: string
  365. enum: [OK]
  366. message:
  367. type: string
  368. enum: [success]
  369. data:
  370. $ref: '#/LoginData'
  371. requestId:
  372. type: string
  373. format: uuid
  374. UserResponse:
  375. type: object
  376. additionalProperties: false
  377. required: [code, message, data, requestId]
  378. properties:
  379. code:
  380. type: string
  381. enum: [OK]
  382. message:
  383. type: string
  384. enum: [success]
  385. data:
  386. $ref: '#/UserSummary'
  387. requestId:
  388. type: string
  389. format: uuid
  390. OrganizationNode:
  391. type: object
  392. additionalProperties: false
  393. required: [id, parentId, orgCode, orgName, orgPath, sortNo, status, rowVersion, children]
  394. properties:
  395. id:
  396. $ref: '#/StringId'
  397. parentId:
  398. allOf:
  399. - $ref: '#/StringId'
  400. nullable: true
  401. orgCode:
  402. type: string
  403. orgName:
  404. type: string
  405. orgPath:
  406. type: string
  407. sortNo:
  408. type: integer
  409. status:
  410. $ref: '#/EnabledStatus'
  411. rowVersion:
  412. type: integer
  413. minimum: 0
  414. children:
  415. type: array
  416. items:
  417. $ref: '#/OrganizationNode'
  418. OrganizationTreeResponse:
  419. type: object
  420. additionalProperties: false
  421. required: [code, message, data, requestId]
  422. properties:
  423. code:
  424. type: string
  425. enum: [OK]
  426. message:
  427. type: string
  428. enum: [success]
  429. data:
  430. type: array
  431. items:
  432. $ref: '#/OrganizationNode'
  433. requestId:
  434. type: string
  435. format: uuid
  436. UserPage:
  437. type: object
  438. additionalProperties: false
  439. required: [items, page, pageSize, total, totalPages]
  440. properties:
  441. items:
  442. type: array
  443. items:
  444. $ref: '#/UserSummary'
  445. page:
  446. type: integer
  447. minimum: 1
  448. pageSize:
  449. type: integer
  450. minimum: 1
  451. maximum: 100
  452. total:
  453. type: integer
  454. minimum: 0
  455. totalPages:
  456. type: integer
  457. minimum: 0
  458. UserPageResponse:
  459. type: object
  460. additionalProperties: false
  461. required: [code, message, data, requestId]
  462. properties:
  463. code:
  464. type: string
  465. enum: [OK]
  466. message:
  467. type: string
  468. enum: [success]
  469. data:
  470. $ref: '#/UserPage'
  471. requestId:
  472. type: string
  473. format: uuid
  474. EmptySuccessResponse:
  475. type: object
  476. additionalProperties: false
  477. required: [code, message, data, requestId]
  478. properties:
  479. code:
  480. type: string
  481. enum: [OK]
  482. message:
  483. type: string
  484. enum: [success]
  485. data:
  486. type: object
  487. additionalProperties: false
  488. requestId:
  489. type: string
  490. format: uuid
  491. CategoryNode:
  492. type: object
  493. additionalProperties: false
  494. required:
  495. - id
  496. - categoryCode
  497. - categoryName
  498. - categoryType
  499. - parentId
  500. - categoryPath
  501. - sortNo
  502. - documentCount
  503. - rowVersion
  504. - children
  505. properties:
  506. id:
  507. $ref: '#/StringId'
  508. categoryCode:
  509. type: string
  510. maxLength: 64
  511. categoryName:
  512. type: string
  513. maxLength: 128
  514. categoryType:
  515. $ref: '#/CategoryType'
  516. parentId:
  517. allOf:
  518. - $ref: '#/StringId'
  519. nullable: true
  520. categoryPath:
  521. type: string
  522. maxLength: 1000
  523. sortNo:
  524. type: integer
  525. documentCount:
  526. type: integer
  527. minimum: 0
  528. description: 该分类完整有效子树内所有有效MAIN数量(不按当前用户密级/权限过滤,所有登录用户口径一致)。
  529. rowVersion:
  530. type: integer
  531. minimum: 0
  532. children:
  533. type: array
  534. items:
  535. $ref: '#/CategoryNode'
  536. CreateCategoryRequest:
  537. type: object
  538. additionalProperties: false
  539. required: [categoryCode, categoryName, categoryType, parentId, sortNo]
  540. properties:
  541. categoryCode:
  542. type: string
  543. minLength: 1
  544. maxLength: 64
  545. categoryName:
  546. type: string
  547. minLength: 1
  548. maxLength: 128
  549. categoryType:
  550. $ref: '#/CategoryType'
  551. parentId:
  552. allOf:
  553. - $ref: '#/StringId'
  554. nullable: true
  555. sortNo:
  556. type: integer
  557. UpdateCategoryRequest:
  558. type: object
  559. additionalProperties: false
  560. required: [categoryName, categoryType, parentId, sortNo, rowVersion]
  561. properties:
  562. categoryName:
  563. type: string
  564. minLength: 1
  565. maxLength: 128
  566. categoryType:
  567. $ref: '#/CategoryType'
  568. parentId:
  569. allOf:
  570. - $ref: '#/StringId'
  571. nullable: true
  572. sortNo:
  573. type: integer
  574. rowVersion:
  575. type: integer
  576. minimum: 0
  577. CategoryTreeResponse:
  578. type: object
  579. additionalProperties: false
  580. required: [code, message, data, requestId]
  581. properties:
  582. code:
  583. type: string
  584. enum: [OK]
  585. message:
  586. type: string
  587. enum: [success]
  588. data:
  589. type: array
  590. items:
  591. $ref: '#/CategoryNode'
  592. requestId:
  593. type: string
  594. format: uuid
  595. CategoryResponse:
  596. type: object
  597. additionalProperties: false
  598. required: [code, message, data, requestId]
  599. properties:
  600. code:
  601. type: string
  602. enum: [OK]
  603. message:
  604. type: string
  605. enum: [success]
  606. data:
  607. $ref: '#/CategoryNode'
  608. requestId:
  609. type: string
  610. format: uuid
  611. DeleteCategoryData:
  612. type: object
  613. additionalProperties: false
  614. required: [id, deleted]
  615. properties:
  616. id:
  617. $ref: '#/StringId'
  618. deleted:
  619. type: boolean
  620. enum: [true]
  621. DeleteCategoryResponse:
  622. type: object
  623. additionalProperties: false
  624. required: [code, message, data, requestId]
  625. properties:
  626. code:
  627. type: string
  628. enum: [OK]
  629. message:
  630. type: string
  631. enum: [success]
  632. data:
  633. $ref: '#/DeleteCategoryData'
  634. requestId:
  635. type: string
  636. format: uuid
  637. PermissionSummary:
  638. type: object
  639. additionalProperties: false
  640. required: [borrowerCount, inheritedFromMainPlan]
  641. properties:
  642. borrowerCount:
  643. type: integer
  644. minimum: 0
  645. description: 生效(canView且未到期)借阅人数
  646. inheritedFromMainPlan:
  647. type: boolean
  648. DocumentSummary:
  649. type: object
  650. required:
  651. - id
  652. - documentName
  653. - summary
  654. - documentType
  655. - status
  656. - securityLevel
  657. - borrowSummary
  658. - categoryId
  659. - categoryName
  660. - categoryPath
  661. - parentDocumentId
  662. - rootDocumentId
  663. - attachmentType
  664. - fileExtension
  665. - tags
  666. - childCount
  667. - attachmentCount
  668. - viewCount
  669. - downloadCount
  670. - createdByName
  671. - createdAt
  672. - updatedAt
  673. - rowVersion
  674. - allowedActions
  675. - hasPassword
  676. - passwordProtectedActions
  677. - viewLocked
  678. properties:
  679. id:
  680. $ref: '#/StringId'
  681. documentName:
  682. type: string
  683. summary:
  684. type: string
  685. nullable: true
  686. description:
  687. type: string
  688. nullable: true
  689. description: 详细说明:管理员在"查看"对话框维护,供普通用户阅读;不参与全文检索。
  690. documentType:
  691. $ref: '#/DocumentType'
  692. status:
  693. $ref: '#/DocumentStatus'
  694. securityLevel:
  695. $ref: '#/SecurityLevel'
  696. borrowSummary:
  697. type: string
  698. description: 生效借阅人姓名以"、"连接;未配置时为"未配置";无查看权限的列表行返回"-"
  699. categoryId:
  700. allOf:
  701. - $ref: '#/StringId'
  702. nullable: true
  703. categoryName:
  704. type: string
  705. nullable: true
  706. categoryPath:
  707. type: string
  708. nullable: true
  709. parentDocumentId:
  710. allOf:
  711. - $ref: '#/StringId'
  712. nullable: true
  713. rootDocumentId:
  714. allOf:
  715. - $ref: '#/StringId'
  716. nullable: true
  717. attachmentType:
  718. allOf:
  719. - $ref: '#/AttachmentType'
  720. nullable: true
  721. fileExtension:
  722. type: string
  723. tags:
  724. type: array
  725. items:
  726. type: string
  727. childCount:
  728. type: integer
  729. minimum: 0
  730. attachmentCount:
  731. type: integer
  732. minimum: 0
  733. viewCount:
  734. type: integer
  735. minimum: 0
  736. downloadCount:
  737. type: integer
  738. minimum: 0
  739. createdByName:
  740. type: string
  741. nullable: true
  742. createdAt:
  743. $ref: '#/UtcDateTime'
  744. updatedAt:
  745. $ref: '#/UtcDateTime'
  746. rowVersion:
  747. type: integer
  748. minimum: 0
  749. allowedActions:
  750. type: array
  751. uniqueItems: true
  752. items:
  753. $ref: '#/AllowedAction'
  754. hasPassword:
  755. type: boolean
  756. description: 主案是否设置密码锁;仅MAIN可设,其余类型恒false。
  757. passwordProtectedActions:
  758. type: array
  759. uniqueItems: true
  760. items:
  761. $ref: '#/DocumentPasswordAction'
  762. description: 密码锁勾选保护的操作码集合;未设密恒为空数组。
  763. viewLocked:
  764. type: boolean
  765. description: 当前用户查看该文档正文是否需要密码;viewLocked时contentSnippet不返回。
  766. mountedPlanCount:
  767. type: integer
  768. minimum: 0
  769. description: 仅共享附件响应返回。
  770. DocumentDetail:
  771. allOf:
  772. - $ref: '#/DocumentSummary'
  773. - type: object
  774. required:
  775. - originalFileName
  776. - mimeType
  777. - fileSize
  778. - fileHash
  779. - permissionSummary
  780. - viewPasswordVerified
  781. - contentText
  782. properties:
  783. originalFileName:
  784. type: string
  785. mimeType:
  786. type: string
  787. nullable: true
  788. fileSize:
  789. type: integer
  790. minimum: 0
  791. fileHash:
  792. type: string
  793. pattern: '^[0-9a-fA-F]{64}$'
  794. permissionSummary:
  795. $ref: '#/PermissionSummary'
  796. viewPasswordVerified:
  797. type: boolean
  798. description: 查看是否已通过密码验证(未锁定恒true)。
  799. contentText:
  800. type: string
  801. nullable: true
  802. description: 提取的正文文本;viewLocked且请求头密码未验证通过时为null。
  803. contentExtractStatus:
  804. type: string
  805. enum: [SUCCESS, EMPTY, UNSUPPORTED, FAILED]
  806. description: 正文提取状态。仅管理员详情响应返回。
  807. contentExtractError:
  808. type: string
  809. nullable: true
  810. description: 提取失败的脱敏原因(异常类型+首行信息,不含绝对路径)。仅管理员详情响应返回;非FAILED时为null。
  811. contentExtractedAt:
  812. type: string
  813. format: date-time
  814. nullable: true
  815. description: 最近一次正文提取时间(UTC)。仅管理员详情响应返回。
  816. AttachmentBindingSummary:
  817. allOf:
  818. - $ref: '#/DocumentSummary'
  819. - type: object
  820. required: [bindingId, bindingSortNo, mountedPlanCount]
  821. properties:
  822. bindingId:
  823. $ref: '#/StringId'
  824. bindingSortNo:
  825. type: integer
  826. mountedPlanCount:
  827. type: integer
  828. minimum: 0
  829. DocumentPage:
  830. type: object
  831. additionalProperties: false
  832. required: [items, page, pageSize, total, totalPages]
  833. properties:
  834. items:
  835. type: array
  836. items:
  837. $ref: '#/DocumentSummary'
  838. page:
  839. type: integer
  840. minimum: 1
  841. pageSize:
  842. type: integer
  843. minimum: 1
  844. maximum: 100
  845. total:
  846. type: integer
  847. minimum: 0
  848. totalPages:
  849. type: integer
  850. minimum: 0
  851. AttachmentBindingPage:
  852. type: object
  853. additionalProperties: false
  854. required: [items, page, pageSize, total, totalPages]
  855. properties:
  856. items:
  857. type: array
  858. items:
  859. $ref: '#/AttachmentBindingSummary'
  860. page:
  861. type: integer
  862. minimum: 1
  863. pageSize:
  864. type: integer
  865. minimum: 1
  866. maximum: 100
  867. total:
  868. type: integer
  869. minimum: 0
  870. totalPages:
  871. type: integer
  872. minimum: 0
  873. MainPlanBrief:
  874. type: object
  875. additionalProperties: false
  876. required: [id, documentName, categoryName, securityLevel]
  877. properties:
  878. id:
  879. $ref: '#/StringId'
  880. documentName:
  881. type: string
  882. categoryName:
  883. type: string
  884. nullable: true
  885. securityLevel:
  886. $ref: '#/SecurityLevel'
  887. MainPlanBriefCollection:
  888. type: object
  889. additionalProperties: false
  890. required: [items, total]
  891. properties:
  892. items:
  893. type: array
  894. items:
  895. $ref: '#/MainPlanBrief'
  896. total:
  897. type: integer
  898. minimum: 0
  899. DocumentPageResponse:
  900. type: object
  901. additionalProperties: false
  902. required: [code, message, data, requestId]
  903. properties:
  904. code:
  905. type: string
  906. enum: [OK]
  907. message:
  908. type: string
  909. enum: [success]
  910. data:
  911. $ref: '#/DocumentPage'
  912. requestId:
  913. type: string
  914. format: uuid
  915. DocumentDetailResponse:
  916. type: object
  917. additionalProperties: false
  918. required: [code, message, data, requestId]
  919. properties:
  920. code:
  921. type: string
  922. enum: [OK]
  923. message:
  924. type: string
  925. enum: [success]
  926. data:
  927. $ref: '#/DocumentDetail'
  928. requestId:
  929. type: string
  930. format: uuid
  931. AttachmentBindingPageResponse:
  932. type: object
  933. additionalProperties: false
  934. required: [code, message, data, requestId]
  935. properties:
  936. code:
  937. type: string
  938. enum: [OK]
  939. message:
  940. type: string
  941. enum: [success]
  942. data:
  943. $ref: '#/AttachmentBindingPage'
  944. requestId:
  945. type: string
  946. format: uuid
  947. MainPlanBriefCollectionResponse:
  948. type: object
  949. additionalProperties: false
  950. required: [code, message, data, requestId]
  951. properties:
  952. code:
  953. type: string
  954. enum: [OK]
  955. message:
  956. type: string
  957. enum: [success]
  958. data:
  959. $ref: '#/MainPlanBriefCollection'
  960. requestId:
  961. type: string
  962. format: uuid
  963. MainDocumentCreateMetadata:
  964. type: object
  965. additionalProperties: false
  966. required: [documentName, documentType, summary, categoryId, securityLevel, tags]
  967. properties:
  968. documentName: {type: string, minLength: 1, maxLength: 255}
  969. documentType: {type: string, enum: [MAIN]}
  970. summary: {type: string, nullable: true}
  971. categoryId: {$ref: '#/StringId'}
  972. securityLevel: {$ref: '#/SecurityLevel'}
  973. overwriteDocumentId:
  974. allOf: [{$ref: '#/StringId'}]
  975. description: 仅在用户确认覆盖同名主案后提交,并必须与rowVersion同时出现。
  976. rowVersion:
  977. type: integer
  978. minimum: 0
  979. description: 被覆盖文档的当前版本;仅与overwriteDocumentId同时提交。
  980. tags:
  981. type: array
  982. maxItems: 50
  983. items: {type: string, minLength: 1, maxLength: 64}
  984. password:
  985. type: string
  986. minLength: 1
  987. maxLength: 128
  988. description: 可选;仅新增MAIN时允许,与protectedActions必须同时出现;覆盖上传(overwriteDocumentId)时禁止携带。
  989. protectedActions:
  990. type: array
  991. uniqueItems: true
  992. items: {$ref: '#/DocumentPasswordAction'}
  993. description: 可选;密码保护的操作码集合,与password必须同时出现。
  994. SubPlanCreateMetadata:
  995. type: object
  996. additionalProperties: false
  997. required: [documentName, documentType, summary, parentDocumentId, securityLevel, tags]
  998. properties:
  999. documentName: {type: string, minLength: 1, maxLength: 255}
  1000. documentType: {type: string, enum: [SUB_PLAN]}
  1001. summary: {type: string, nullable: true}
  1002. parentDocumentId: {$ref: '#/StringId'}
  1003. securityLevel: {$ref: '#/SecurityLevel'}
  1004. overwriteDocumentId:
  1005. allOf: [{$ref: '#/StringId'}]
  1006. description: 仅在用户确认覆盖同一主案下同名子案后提交,并必须与rowVersion同时出现。
  1007. rowVersion:
  1008. type: integer
  1009. minimum: 0
  1010. description: 被覆盖文档的当前版本;仅与overwriteDocumentId同时提交。
  1011. tags:
  1012. type: array
  1013. maxItems: 50
  1014. items: {type: string, minLength: 1, maxLength: 64}
  1015. DocumentCreateMetadata:
  1016. oneOf:
  1017. - $ref: '#/MainDocumentCreateMetadata'
  1018. - $ref: '#/SubPlanCreateMetadata'
  1019. discriminator:
  1020. propertyName: documentType
  1021. AttachmentCreateMetadata:
  1022. type: object
  1023. additionalProperties: false
  1024. required: [documentName, attachmentType, summary, tags]
  1025. properties:
  1026. documentName: {type: string, minLength: 1, maxLength: 255}
  1027. attachmentType: {$ref: '#/AttachmentType'}
  1028. summary: {type: string, nullable: true}
  1029. tags:
  1030. type: array
  1031. maxItems: 50
  1032. items: {type: string, minLength: 1, maxLength: 64}
  1033. MainDocumentUpdateRequest:
  1034. type: object
  1035. additionalProperties: false
  1036. required: [documentName, summary, categoryId, securityLevel, tags, rowVersion]
  1037. properties:
  1038. documentName: {type: string, minLength: 1, maxLength: 255}
  1039. summary: {type: string, nullable: true}
  1040. categoryId: {$ref: '#/StringId'}
  1041. securityLevel: {$ref: '#/SecurityLevel'}
  1042. tags:
  1043. type: array
  1044. maxItems: 50
  1045. items: {type: string, minLength: 1, maxLength: 64}
  1046. rowVersion: {type: integer, minimum: 0}
  1047. organizationId:
  1048. allOf:
  1049. - $ref: '#/StringId'
  1050. description: 目标归属部门;缺省沿用现有归属,调整到其他部门仅ADMIN。
  1051. SubPlanUpdateRequest:
  1052. type: object
  1053. additionalProperties: false
  1054. required: [documentName, summary, securityLevel, tags, rowVersion]
  1055. properties:
  1056. documentName: {type: string, minLength: 1, maxLength: 255}
  1057. summary: {type: string, nullable: true}
  1058. securityLevel: {$ref: '#/SecurityLevel'}
  1059. tags:
  1060. type: array
  1061. maxItems: 50
  1062. items: {type: string, minLength: 1, maxLength: 64}
  1063. rowVersion: {type: integer, minimum: 0}
  1064. organizationId:
  1065. allOf:
  1066. - $ref: '#/StringId'
  1067. description: 目标归属部门;缺省沿用现有归属,调整到其他部门仅ADMIN。
  1068. UpdateDocumentRequest:
  1069. oneOf:
  1070. - $ref: '#/MainDocumentUpdateRequest'
  1071. - $ref: '#/SubPlanUpdateRequest'
  1072. UpdateDocumentDescriptionRequest:
  1073. type: object
  1074. additionalProperties: false
  1075. required: [description]
  1076. properties:
  1077. description: {type: string, nullable: true, maxLength: 20000}
  1078. DocumentPasswordAction:
  1079. type: string
  1080. description: 主案密码锁可保护的操作码(与权限矩阵7操作对齐)。
  1081. enum:
  1082. - VIEW
  1083. - DOWNLOAD
  1084. - EDIT
  1085. - DELETE
  1086. - CONFIG_PERMISSION
  1087. - BIND_ATTACHMENT
  1088. - UNBIND_ATTACHMENT
  1089. UpdateDocumentPasswordRequest:
  1090. type: object
  1091. additionalProperties: false
  1092. required: [rowVersion]
  1093. properties:
  1094. rowVersion: {type: integer, minimum: 0, description: 主案当前版本,乐观锁。}
  1095. oldPassword:
  1096. type: string
  1097. maxLength: 128
  1098. description: 已设密时修改/清除必须提供且正确;未设密时禁止提供。
  1099. password:
  1100. type: string
  1101. minLength: 1
  1102. maxLength: 128
  1103. description: 新密码;缺省或空表示清除密码锁,此时不得携带protectedActions。
  1104. protectedActions:
  1105. type: array
  1106. uniqueItems: true
  1107. items: {$ref: '#/DocumentPasswordAction'}
  1108. description: 设置/修改密码时的保护操作集合;与password必须同时出现。
  1109. DocumentPasswordSummary:
  1110. type: object
  1111. additionalProperties: false
  1112. required: [id, hasPassword, protectedActions, rowVersion]
  1113. properties:
  1114. id: {$ref: '#/StringId'}
  1115. hasPassword: {type: boolean}
  1116. protectedActions:
  1117. type: array
  1118. uniqueItems: true
  1119. items: {$ref: '#/DocumentPasswordAction'}
  1120. rowVersion: {type: integer, minimum: 0}
  1121. DocumentPasswordResponse:
  1122. type: object
  1123. additionalProperties: false
  1124. required: [code, message, data, requestId]
  1125. properties:
  1126. code:
  1127. type: string
  1128. enum: [OK]
  1129. message:
  1130. type: string
  1131. enum: [success]
  1132. data:
  1133. $ref: '#/DocumentPasswordSummary'
  1134. requestId:
  1135. type: string
  1136. format: uuid
  1137. UpdateAttachmentRequest:
  1138. type: object
  1139. additionalProperties: false
  1140. required: [documentName, attachmentType, summary, tags, rowVersion]
  1141. properties:
  1142. documentName: {type: string, minLength: 1, maxLength: 255}
  1143. attachmentType: {$ref: '#/AttachmentType'}
  1144. summary: {type: string, nullable: true}
  1145. tags:
  1146. type: array
  1147. maxItems: 50
  1148. items: {type: string, minLength: 1, maxLength: 64}
  1149. rowVersion: {type: integer, minimum: 0}
  1150. organizationId:
  1151. allOf:
  1152. - $ref: '#/StringId'
  1153. description: 目标归属部门;缺省沿用现有归属,调整到其他部门仅ADMIN。
  1154. DeleteDocumentData:
  1155. type: object
  1156. additionalProperties: false
  1157. required: [id, deleted]
  1158. properties:
  1159. id: {$ref: '#/StringId'}
  1160. deleted: {type: boolean, enum: [true]}
  1161. DeleteDocumentResponse:
  1162. type: object
  1163. additionalProperties: false
  1164. required: [code, message, data, requestId]
  1165. properties:
  1166. code: {type: string, enum: [OK]}
  1167. message: {type: string, enum: [success]}
  1168. data: {$ref: '#/DeleteDocumentData'}
  1169. requestId: {type: string, format: uuid}
  1170. BatchImportMultipart:
  1171. type: object
  1172. additionalProperties: false
  1173. required: [files, items]
  1174. properties:
  1175. files:
  1176. type: array
  1177. minItems: 1
  1178. items: {type: string, format: binary}
  1179. description: 重复files字段,顺序与items数组严格对应。
  1180. items:
  1181. type: string
  1182. description: 文档或附件metadata对象数组的JSON字符串。
  1183. BatchImportItem:
  1184. type: object
  1185. additionalProperties: false
  1186. required: [index, originalFileName, success]
  1187. properties:
  1188. index: {type: integer, minimum: 0}
  1189. originalFileName: {type: string}
  1190. success: {type: boolean}
  1191. document: {$ref: '#/DocumentDetail'}
  1192. errorCode: {type: string}
  1193. errorMessage: {type: string}
  1194. BatchImportData:
  1195. type: object
  1196. additionalProperties: false
  1197. required: [total, successCount, failureCount, items]
  1198. properties:
  1199. total: {type: integer, minimum: 0}
  1200. successCount: {type: integer, minimum: 0}
  1201. failureCount: {type: integer, minimum: 0}
  1202. items:
  1203. type: array
  1204. items: {$ref: '#/BatchImportItem'}
  1205. BatchImportResponse:
  1206. type: object
  1207. additionalProperties: false
  1208. required: [code, message, data, requestId]
  1209. properties:
  1210. code: {type: string, enum: [OK]}
  1211. message: {type: string, enum: [success]}
  1212. data: {$ref: '#/BatchImportData'}
  1213. requestId: {type: string, format: uuid}
  1214. BindAttachmentsRequest:
  1215. type: object
  1216. additionalProperties: false
  1217. required: [attachmentIds, mainPlanRowVersion]
  1218. properties:
  1219. attachmentIds:
  1220. type: array
  1221. minItems: 1
  1222. items: {$ref: '#/StringId'}
  1223. mainPlanRowVersion:
  1224. type: integer
  1225. minimum: 0
  1226. BindAttachmentsData:
  1227. type: object
  1228. additionalProperties: false
  1229. required: [createdCount, existingCount, attachmentCount, mainPlanRowVersion]
  1230. properties:
  1231. createdCount: {type: integer, minimum: 0}
  1232. existingCount: {type: integer, minimum: 0}
  1233. attachmentCount: {type: integer, minimum: 0}
  1234. mainPlanRowVersion: {type: integer, minimum: 0}
  1235. BindAttachmentsResponse:
  1236. type: object
  1237. additionalProperties: false
  1238. required: [code, message, data, requestId]
  1239. properties:
  1240. code: {type: string, enum: [OK]}
  1241. message: {type: string, enum: [success]}
  1242. data: {$ref: '#/BindAttachmentsData'}
  1243. requestId: {type: string, format: uuid}
  1244. UnbindAttachmentData:
  1245. type: object
  1246. additionalProperties: false
  1247. required: [attachmentCount, mainPlanRowVersion]
  1248. properties:
  1249. attachmentCount: {type: integer, minimum: 0}
  1250. mainPlanRowVersion: {type: integer, minimum: 0}
  1251. UnbindAttachmentResponse:
  1252. type: object
  1253. additionalProperties: false
  1254. required: [code, message, data, requestId]
  1255. properties:
  1256. code: {type: string, enum: [OK]}
  1257. message: {type: string, enum: [success]}
  1258. data: {$ref: '#/UnbindAttachmentData'}
  1259. requestId: {type: string, format: uuid}
  1260. ReorderDocumentsRequest:
  1261. type: object
  1262. additionalProperties: false
  1263. required: [orderedIds]
  1264. properties:
  1265. orderedIds:
  1266. type: array
  1267. minItems: 2
  1268. items: {$ref: '#/StringId'}
  1269. ReorderDocumentsData:
  1270. type: object
  1271. additionalProperties: false
  1272. required: [reorderedCount]
  1273. properties:
  1274. reorderedCount: {type: integer, minimum: 0}
  1275. ReorderDocumentsResponse:
  1276. type: object
  1277. additionalProperties: false
  1278. required: [code, message, data, requestId]
  1279. properties:
  1280. code: {type: string, enum: [OK]}
  1281. message: {type: string, enum: [success]}
  1282. data: {$ref: '#/ReorderDocumentsData'}
  1283. requestId: {type: string, format: uuid}
  1284. ReorderAttachmentsRequest:
  1285. type: object
  1286. additionalProperties: false
  1287. required: [orderedBindingIds, mainPlanRowVersion]
  1288. properties:
  1289. orderedBindingIds:
  1290. type: array
  1291. minItems: 2
  1292. items: {$ref: '#/StringId'}
  1293. mainPlanRowVersion:
  1294. type: integer
  1295. minimum: 0
  1296. ReorderAttachmentsData:
  1297. type: object
  1298. additionalProperties: false
  1299. required: [reorderedCount, mainPlanRowVersion]
  1300. properties:
  1301. reorderedCount: {type: integer, minimum: 0}
  1302. mainPlanRowVersion: {type: integer, minimum: 0}
  1303. ReorderAttachmentsResponse:
  1304. type: object
  1305. additionalProperties: false
  1306. required: [code, message, data, requestId]
  1307. properties:
  1308. code: {type: string, enum: [OK]}
  1309. message: {type: string, enum: [success]}
  1310. data: {$ref: '#/ReorderAttachmentsData'}
  1311. requestId: {type: string, format: uuid}
  1312. ReorderCategoriesRequest:
  1313. type: object
  1314. additionalProperties: false
  1315. required: [parentId, orderedIds]
  1316. properties:
  1317. parentId:
  1318. oneOf:
  1319. - $ref: '#/StringId'
  1320. - type: 'null'
  1321. orderedIds:
  1322. type: array
  1323. minItems: 2
  1324. items: {$ref: '#/StringId'}
  1325. ReorderCategoriesData:
  1326. type: object
  1327. additionalProperties: false
  1328. required: [reorderedCount]
  1329. properties:
  1330. reorderedCount: {type: integer, minimum: 0}
  1331. ReorderCategoriesResponse:
  1332. type: object
  1333. additionalProperties: false
  1334. required: [code, message, data, requestId]
  1335. properties:
  1336. code: {type: string, enum: [OK]}
  1337. message: {type: string, enum: [success]}
  1338. data: {$ref: '#/ReorderCategoriesData'}
  1339. requestId: {type: string, format: uuid}
  1340. ReorderOrganizationsRequest:
  1341. type: object
  1342. additionalProperties: false
  1343. required: [parentId, orderedIds]
  1344. properties:
  1345. parentId:
  1346. oneOf:
  1347. - $ref: '#/StringId'
  1348. - type: 'null'
  1349. orderedIds:
  1350. type: array
  1351. minItems: 2
  1352. items: {$ref: '#/StringId'}
  1353. ReorderByIdsRequest:
  1354. type: object
  1355. additionalProperties: false
  1356. required: [orderedIds]
  1357. properties:
  1358. orderedIds:
  1359. type: array
  1360. minItems: 2
  1361. items: {$ref: '#/StringId'}
  1362. ReorderResultData:
  1363. type: object
  1364. additionalProperties: false
  1365. required: [reorderedCount]
  1366. properties:
  1367. reorderedCount: {type: integer, minimum: 0}
  1368. ReorderResultResponse:
  1369. type: object
  1370. additionalProperties: false
  1371. required: [code, message, data, requestId]
  1372. properties:
  1373. code: {type: string, enum: [OK]}
  1374. message: {type: string, enum: [success]}
  1375. data: {$ref: '#/ReorderResultData'}
  1376. requestId: {type: string, format: uuid}
  1377. PermissionEntry:
  1378. type: object
  1379. additionalProperties: false
  1380. required:
  1381. - id
  1382. - subjectId
  1383. - subjectName
  1384. - canView
  1385. - canDownload
  1386. - expiresAt
  1387. - voucherFileName
  1388. - voucherFileSize
  1389. - voucherUploadedAt
  1390. properties:
  1391. id: {$ref: '#/StringId'}
  1392. subjectId: {$ref: '#/StringId'}
  1393. subjectName: {type: string}
  1394. canView: {type: boolean}
  1395. canDownload: {type: boolean}
  1396. expiresAt: {$ref: '#/UtcDateTime'}
  1397. voucherFileName: {type: string, nullable: true}
  1398. voucherFileSize: {type: integer, minimum: 1, nullable: true}
  1399. voucherUploadedAt:
  1400. allOf:
  1401. - $ref: '#/UtcDateTime'
  1402. nullable: true
  1403. SavePermissionEntry:
  1404. type: object
  1405. additionalProperties: false
  1406. required:
  1407. - subjectId
  1408. - canView
  1409. - canDownload
  1410. - expiresAt
  1411. properties:
  1412. subjectId: {$ref: '#/StringId'}
  1413. canView: {type: boolean}
  1414. canDownload: {type: boolean}
  1415. expiresAt: {$ref: '#/UtcDateTime'}
  1416. SavePermissionsRequest:
  1417. type: object
  1418. additionalProperties: false
  1419. required: [documentRowVersion, entries]
  1420. properties:
  1421. documentRowVersion: {type: integer, minimum: 0}
  1422. entries:
  1423. type: array
  1424. items: {$ref: '#/SavePermissionEntry'}
  1425. description: 借阅授权全集(非增量补丁);仅用户主体,expiresAt必须晚于当前时间且不超过当前时间+7天(服务端含60秒容差);保存不触碰审批单凭证。
  1426. PermissionDetail:
  1427. type: object
  1428. additionalProperties: false
  1429. required:
  1430. - documentId
  1431. - sourceDocumentId
  1432. - inherited
  1433. - documentRowVersion
  1434. - entries
  1435. properties:
  1436. documentId: {$ref: '#/StringId'}
  1437. sourceDocumentId: {$ref: '#/StringId'}
  1438. inherited: {type: boolean}
  1439. documentRowVersion: {type: integer, minimum: 0}
  1440. entries:
  1441. type: array
  1442. items: {$ref: '#/PermissionEntry'}
  1443. description: 按subjectId升序返回全部未删除授权(含已到期条目,由前端标记)。
  1444. PermissionVoucherResult:
  1445. type: object
  1446. additionalProperties: false
  1447. required: [documentId, entryId, voucherFileName, voucherFileSize, voucherUploadedAt]
  1448. properties:
  1449. documentId: {$ref: '#/StringId'}
  1450. entryId: {$ref: '#/StringId'}
  1451. voucherFileName: {type: string}
  1452. voucherFileSize: {type: integer, minimum: 1}
  1453. voucherUploadedAt: {$ref: '#/UtcDateTime'}
  1454. PermissionVoucherResultResponse:
  1455. type: object
  1456. additionalProperties: false
  1457. required: [code, message, data, requestId]
  1458. properties:
  1459. code: {type: string, enum: [OK]}
  1460. message: {type: string, enum: [success]}
  1461. data: {$ref: '#/PermissionVoucherResult'}
  1462. requestId: {type: string, format: uuid}
  1463. PermissionVoucherDeleteResult:
  1464. type: object
  1465. additionalProperties: false
  1466. required: [documentId, entryId]
  1467. properties:
  1468. documentId: {$ref: '#/StringId'}
  1469. entryId: {$ref: '#/StringId'}
  1470. PermissionVoucherDeleteResultResponse:
  1471. type: object
  1472. additionalProperties: false
  1473. required: [code, message, data, requestId]
  1474. properties:
  1475. code: {type: string, enum: [OK]}
  1476. message: {type: string, enum: [success]}
  1477. data: {$ref: '#/PermissionVoucherDeleteResult'}
  1478. requestId: {type: string, format: uuid}
  1479. PermissionDetailResponse:
  1480. type: object
  1481. additionalProperties: false
  1482. required: [code, message, data, requestId]
  1483. properties:
  1484. code: {type: string, enum: [OK]}
  1485. message: {type: string, enum: [success]}
  1486. data: {$ref: '#/PermissionDetail'}
  1487. requestId: {type: string, format: uuid}
  1488. AuditGranularity:
  1489. type: string
  1490. enum: [DAY, WEEK, MONTH]
  1491. AuditLogSummary:
  1492. type: object
  1493. additionalProperties: false
  1494. required:
  1495. - id
  1496. - username
  1497. - realName
  1498. - organizationName
  1499. - actionType
  1500. - targetType
  1501. - targetId
  1502. - targetName
  1503. - operationResult
  1504. - failureReason
  1505. - clientIp
  1506. - requestId
  1507. - createdAt
  1508. properties:
  1509. id: {$ref: '#/StringId'}
  1510. username: {type: string, nullable: true}
  1511. realName: {type: string, nullable: true}
  1512. organizationName: {type: string, nullable: true}
  1513. actionType: {$ref: '#/AuditAction'}
  1514. targetType:
  1515. allOf: [{$ref: '#/AuditTarget'}]
  1516. nullable: true
  1517. targetId:
  1518. allOf: [{$ref: '#/StringId'}]
  1519. nullable: true
  1520. targetName: {type: string, nullable: true}
  1521. operationResult: {$ref: '#/AuditResult'}
  1522. failureReason: {type: string, nullable: true}
  1523. clientIp: {type: string, nullable: true}
  1524. requestId: {type: string, nullable: true}
  1525. createdAt: {$ref: '#/UtcDateTime'}
  1526. AuditLogPage:
  1527. type: object
  1528. additionalProperties: false
  1529. required: [items, page, pageSize, total, totalPages]
  1530. properties:
  1531. items: {type: array, items: {$ref: '#/AuditLogSummary'}}
  1532. page: {type: integer, minimum: 1}
  1533. pageSize: {type: integer, minimum: 1, maximum: 100}
  1534. total: {type: integer, minimum: 0}
  1535. totalPages: {type: integer, minimum: 0}
  1536. AuditLogPageResponse:
  1537. type: object
  1538. additionalProperties: false
  1539. required: [code, message, data, requestId]
  1540. properties:
  1541. code: {type: string, enum: [OK]}
  1542. message: {type: string, enum: [success]}
  1543. data: {$ref: '#/AuditLogPage'}
  1544. requestId: {type: string, format: uuid}
  1545. DocumentStatistics:
  1546. type: object
  1547. additionalProperties: false
  1548. required: [planDocumentCount, mainPlanCount, subPlanCount, attachmentCount, todayViewerCount]
  1549. properties:
  1550. planDocumentCount: {type: integer, minimum: 0}
  1551. mainPlanCount: {type: integer, minimum: 0}
  1552. subPlanCount: {type: integer, minimum: 0}
  1553. attachmentCount: {type: integer, minimum: 0}
  1554. todayViewerCount: {type: integer, minimum: 0}
  1555. DocumentStatisticsResponse:
  1556. type: object
  1557. additionalProperties: false
  1558. required: [code, message, data, requestId]
  1559. properties:
  1560. code: {type: string, enum: [OK]}
  1561. message: {type: string, enum: [success]}
  1562. data: {$ref: '#/DocumentStatistics'}
  1563. requestId: {type: string, format: uuid}
  1564. AuditTrendItem:
  1565. type: object
  1566. additionalProperties: false
  1567. required: [period, operationCount]
  1568. properties:
  1569. period: {type: string}
  1570. operationCount: {type: integer, minimum: 0}
  1571. AuditTrendData:
  1572. type: object
  1573. additionalProperties: false
  1574. required: [items]
  1575. properties:
  1576. items: {type: array, items: {$ref: '#/AuditTrendItem'}}
  1577. AuditTrendResponse:
  1578. type: object
  1579. additionalProperties: false
  1580. required: [code, message, data, requestId]
  1581. properties:
  1582. code: {type: string, enum: [OK]}
  1583. message: {type: string, enum: [success]}
  1584. data: {$ref: '#/AuditTrendData'}
  1585. requestId: {type: string, format: uuid}
  1586. AuditActionStatisticsItem:
  1587. type: object
  1588. additionalProperties: false
  1589. required: [actionType, count]
  1590. properties:
  1591. actionType: {$ref: '#/AuditAction'}
  1592. count: {type: integer, minimum: 0}
  1593. AuditActionStatisticsData:
  1594. type: object
  1595. additionalProperties: false
  1596. required: [items]
  1597. properties:
  1598. items: {type: array, items: {$ref: '#/AuditActionStatisticsItem'}}
  1599. AuditActionStatisticsResponse:
  1600. type: object
  1601. additionalProperties: false
  1602. required: [code, message, data, requestId]
  1603. properties:
  1604. code: {type: string, enum: [OK]}
  1605. message: {type: string, enum: [success]}
  1606. data: {$ref: '#/AuditActionStatisticsData'}
  1607. requestId: {type: string, format: uuid}
  1608. AuditUserStatisticsItem:
  1609. type: object
  1610. additionalProperties: false
  1611. required: [userId, realName, organizationName, operationCount]
  1612. properties:
  1613. userId: {$ref: '#/StringId'}
  1614. realName: {type: string, nullable: true}
  1615. organizationName: {type: string, nullable: true}
  1616. operationCount: {type: integer, minimum: 0}
  1617. AuditUserStatisticsData:
  1618. type: object
  1619. additionalProperties: false
  1620. required: [items]
  1621. properties:
  1622. items: {type: array, items: {$ref: '#/AuditUserStatisticsItem'}}
  1623. AuditUserStatisticsResponse:
  1624. type: object
  1625. additionalProperties: false
  1626. required: [code, message, data, requestId]
  1627. properties:
  1628. code: {type: string, enum: [OK]}
  1629. message: {type: string, enum: [success]}
  1630. data: {$ref: '#/AuditUserStatisticsData'}
  1631. requestId: {type: string, format: uuid}
  1632. DeletedBySnapshot:
  1633. type: object
  1634. additionalProperties: false
  1635. required: [userId, username, realName, organizationName]
  1636. properties:
  1637. userId:
  1638. allOf:
  1639. - $ref: '#/StringId'
  1640. nullable: true
  1641. username: {type: string, nullable: true}
  1642. realName: {type: string, nullable: true}
  1643. organizationName: {type: string, nullable: true}
  1644. RecycleBinDocumentSummary:
  1645. type: object
  1646. additionalProperties: false
  1647. required:
  1648. - id
  1649. - documentName
  1650. - documentType
  1651. - originalFileName
  1652. - categoryId
  1653. - categoryName
  1654. - parentDocumentId
  1655. - securityLevel
  1656. - documentStatus
  1657. - deletedAt
  1658. - updatedBy
  1659. - updatedByName
  1660. - deletedBy
  1661. - rowVersion
  1662. properties:
  1663. id: {$ref: '#/StringId'}
  1664. documentName: {type: string}
  1665. documentType: {$ref: '#/DocumentType'}
  1666. originalFileName: {type: string}
  1667. categoryId:
  1668. allOf:
  1669. - $ref: '#/StringId'
  1670. nullable: true
  1671. categoryName: {type: string, nullable: true}
  1672. parentDocumentId:
  1673. allOf:
  1674. - $ref: '#/StringId'
  1675. nullable: true
  1676. securityLevel: {$ref: '#/SecurityLevel'}
  1677. documentStatus: {$ref: '#/DocumentStatus'}
  1678. deletedAt: {$ref: '#/UtcDateTime'}
  1679. updatedBy:
  1680. allOf:
  1681. - $ref: '#/StringId'
  1682. nullable: true
  1683. updatedByName: {type: string, nullable: true}
  1684. deletedBy:
  1685. allOf:
  1686. - $ref: '#/DeletedBySnapshot'
  1687. nullable: true
  1688. rowVersion: {type: integer, minimum: 0}
  1689. RecycleBinDocumentPage:
  1690. type: object
  1691. additionalProperties: false
  1692. required: [items, page, pageSize, total, totalPages]
  1693. properties:
  1694. items:
  1695. type: array
  1696. items: {$ref: '#/RecycleBinDocumentSummary'}
  1697. page: {type: integer, minimum: 1}
  1698. pageSize: {type: integer, minimum: 1, maximum: 100}
  1699. total: {type: integer, minimum: 0}
  1700. totalPages: {type: integer, minimum: 0}
  1701. RecycleBinDocumentPageResponse:
  1702. type: object
  1703. additionalProperties: false
  1704. required: [code, message, data, requestId]
  1705. properties:
  1706. code: {type: string, enum: [OK]}
  1707. message: {type: string, enum: [success]}
  1708. data: {$ref: '#/RecycleBinDocumentPage'}
  1709. requestId: {type: string, format: uuid}
  1710. RestoreDocumentRequest:
  1711. type: object
  1712. additionalProperties: false
  1713. required: [rowVersion]
  1714. properties:
  1715. rowVersion: {type: integer, minimum: 0}
  1716. RestoredDocument:
  1717. allOf:
  1718. - $ref: '#/DocumentSummary'
  1719. - type: object
  1720. required: [originalFileName, mimeType, fileSize, permissionSummary]
  1721. properties:
  1722. originalFileName: {type: string}
  1723. mimeType: {type: string, nullable: true}
  1724. fileSize: {type: integer, minimum: 0}
  1725. permissionSummary: {$ref: '#/PermissionSummary'}
  1726. mountedPlanCount: {type: integer, minimum: 0}
  1727. RestoreDocumentResult:
  1728. type: object
  1729. additionalProperties: false
  1730. required:
  1731. - document
  1732. - restoredPermissionCount
  1733. - skippedPermissionCount
  1734. - restoredBindingCount
  1735. - skippedBindingCount
  1736. properties:
  1737. document: {$ref: '#/RestoredDocument'}
  1738. restoredPermissionCount: {type: integer, minimum: 0}
  1739. skippedPermissionCount: {type: integer, minimum: 0}
  1740. restoredBindingCount: {type: integer, minimum: 0}
  1741. skippedBindingCount: {type: integer, minimum: 0}
  1742. RestoreDocumentResponse:
  1743. type: object
  1744. additionalProperties: false
  1745. required: [code, message, data, requestId]
  1746. properties:
  1747. code: {type: string, enum: [OK]}
  1748. message: {type: string, enum: [success]}
  1749. data: {$ref: '#/RestoreDocumentResult'}
  1750. requestId: {type: string, format: uuid}
  1751. DictionaryOption:
  1752. type: object
  1753. additionalProperties: false
  1754. required: [code, label, sortNo]
  1755. properties:
  1756. code: {type: string, minLength: 1}
  1757. label: {type: string, minLength: 1}
  1758. sortNo: {type: integer, minimum: 0}
  1759. DictionaryOptionList:
  1760. type: array
  1761. items: {$ref: '#/DictionaryOption'}
  1762. UiDictionaryGroups:
  1763. type: object
  1764. additionalProperties: false
  1765. required:
  1766. - roleCodes
  1767. - allowedModules
  1768. - documentTypes
  1769. - documentStatuses
  1770. - securityLevels
  1771. - attachmentTypes
  1772. - deptScopes
  1773. - allowedActions
  1774. - categoryTypes
  1775. - enabledStatuses
  1776. - auditResults
  1777. - auditActions
  1778. - auditTargets
  1779. properties:
  1780. roleCodes: {$ref: '#/DictionaryOptionList'}
  1781. allowedModules: {$ref: '#/DictionaryOptionList'}
  1782. documentTypes: {$ref: '#/DictionaryOptionList'}
  1783. documentStatuses: {$ref: '#/DictionaryOptionList'}
  1784. securityLevels: {$ref: '#/DictionaryOptionList'}
  1785. attachmentTypes: {$ref: '#/DictionaryOptionList'}
  1786. deptScopes: {$ref: '#/DictionaryOptionList'}
  1787. allowedActions: {$ref: '#/DictionaryOptionList'}
  1788. categoryTypes: {$ref: '#/DictionaryOptionList'}
  1789. enabledStatuses: {$ref: '#/DictionaryOptionList'}
  1790. auditResults: {$ref: '#/DictionaryOptionList'}
  1791. auditActions: {$ref: '#/DictionaryOptionList'}
  1792. auditTargets: {$ref: '#/DictionaryOptionList'}
  1793. UiDictionaries:
  1794. type: object
  1795. additionalProperties: false
  1796. required: [version, locale, dictionaries]
  1797. properties:
  1798. version:
  1799. type: string
  1800. pattern: '^[0-9]{4}\.[0-9]+$'
  1801. example: '2026.1'
  1802. locale:
  1803. type: string
  1804. example: zh-CN
  1805. dictionaries: {$ref: '#/UiDictionaryGroups'}
  1806. UiDictionariesResponse:
  1807. type: object
  1808. additionalProperties: false
  1809. required: [code, message, data, requestId]
  1810. properties:
  1811. code: {type: string, enum: [OK]}
  1812. message: {type: string, enum: [success]}
  1813. data: {$ref: '#/UiDictionaries'}
  1814. requestId: {type: string, format: uuid}
  1815. CreateOrganizationRequest:
  1816. type: object
  1817. additionalProperties: false
  1818. required: [orgCode, orgName, parentId, sortNo, status]
  1819. properties:
  1820. orgCode: {type: string, minLength: 1, maxLength: 64}
  1821. orgName: {type: string, minLength: 1, maxLength: 128}
  1822. parentId:
  1823. allOf: [{$ref: '#/StringId'}]
  1824. nullable: true
  1825. sortNo: {type: integer}
  1826. status: {$ref: '#/EnabledStatus'}
  1827. UpdateOrganizationRequest:
  1828. type: object
  1829. additionalProperties: false
  1830. required: [orgName, parentId, sortNo, status, rowVersion]
  1831. properties:
  1832. orgName: {type: string, minLength: 1, maxLength: 128}
  1833. parentId:
  1834. allOf: [{$ref: '#/StringId'}]
  1835. nullable: true
  1836. sortNo: {type: integer}
  1837. status: {$ref: '#/EnabledStatus'}
  1838. rowVersion: {type: integer, minimum: 0}
  1839. OrganizationResponse:
  1840. type: object
  1841. additionalProperties: false
  1842. required: [code, message, data, requestId]
  1843. properties:
  1844. code: {type: string, enum: [OK]}
  1845. message: {type: string, enum: [success]}
  1846. data:
  1847. allOf: [{$ref: '#/OrganizationNode'}]
  1848. description: 写操作响应中children固定为空数组。
  1849. requestId: {type: string, format: uuid}
  1850. DeleteOrganizationData:
  1851. type: object
  1852. additionalProperties: false
  1853. required: [id, deleted]
  1854. properties:
  1855. id: {$ref: '#/StringId'}
  1856. deleted: {type: boolean, enum: [true]}
  1857. DeleteOrganizationResponse:
  1858. type: object
  1859. additionalProperties: false
  1860. required: [code, message, data, requestId]
  1861. properties:
  1862. code: {type: string, enum: [OK]}
  1863. message: {type: string, enum: [success]}
  1864. data: {$ref: '#/DeleteOrganizationData'}
  1865. requestId: {type: string, format: uuid}
  1866. CreateUserRequest:
  1867. type: object
  1868. additionalProperties: false
  1869. required: [username, realName, initialPassword, organizationId, roleCode, roleId, securityLevel, status]
  1870. properties:
  1871. username: {type: string, minLength: 1, maxLength: 64}
  1872. realName: {type: string, minLength: 1, maxLength: 64}
  1873. initialPassword: {type: string, format: password, minLength: 8, maxLength: 64, writeOnly: true}
  1874. organizationId:
  1875. allOf: [{$ref: '#/StringId'}]
  1876. nullable: true
  1877. roleCode: {$ref: '#/RoleCode'}
  1878. roleId:
  1879. allOf: [{$ref: '#/StringId'}]
  1880. nullable: true
  1881. securityLevel: {$ref: '#/SecurityLevel'}
  1882. status: {$ref: '#/EnabledStatus'}
  1883. managedOrgId:
  1884. type: string
  1885. nullable: true
  1886. description: 用户级管理范围(契约1.30,可选);null=全局、机构ID=固定锚点(须指向未删除机构)。省略或"SELF"时跟随该用户所在机构(落库哨兵0)。
  1887. UpdateUiThemeRequest:
  1888. type: object
  1889. additionalProperties: false
  1890. required: [uiTheme]
  1891. properties:
  1892. uiTheme: {type: string, enum: [blue, red, green]}
  1893. UpdateUserRequest:
  1894. type: object
  1895. additionalProperties: false
  1896. required: [realName, organizationId, roleCode, roleId, securityLevel, status, rowVersion]
  1897. properties:
  1898. realName: {type: string, minLength: 1, maxLength: 64}
  1899. organizationId:
  1900. allOf: [{$ref: '#/StringId'}]
  1901. nullable: true
  1902. roleCode: {$ref: '#/RoleCode'}
  1903. roleId:
  1904. allOf: [{$ref: '#/StringId'}]
  1905. nullable: true
  1906. securityLevel: {$ref: '#/SecurityLevel'}
  1907. status: {$ref: '#/EnabledStatus'}
  1908. managedOrgId:
  1909. type: string
  1910. nullable: true
  1911. description: 用户级管理范围(契约1.30,可选);null=全局、机构ID=固定锚点(须指向未删除机构)、"SELF"=跟随该用户所在机构(落库哨兵0)。省略时保持原值不变。
  1912. rowVersion: {type: integer, minimum: 0}
  1913. DeleteUserData:
  1914. type: object
  1915. additionalProperties: false
  1916. required: [id, deleted]
  1917. properties:
  1918. id: {$ref: '#/StringId'}
  1919. deleted: {type: boolean, enum: [true]}
  1920. DeleteUserResponse:
  1921. type: object
  1922. additionalProperties: false
  1923. required: [code, message, data, requestId]
  1924. properties:
  1925. code: {type: string, enum: [OK]}
  1926. message: {type: string, enum: [success]}
  1927. data: {$ref: '#/DeleteUserData'}
  1928. requestId: {type: string, format: uuid}
  1929. ResetUserPasswordRequest:
  1930. type: object
  1931. additionalProperties: false
  1932. required: [newPassword, rowVersion]
  1933. properties:
  1934. newPassword: {type: string, format: password, minLength: 8, maxLength: 64, writeOnly: true}
  1935. rowVersion: {type: integer, minimum: 0}
  1936. ResetPasswordData:
  1937. type: object
  1938. additionalProperties: false
  1939. required: [id, reset, authVersion]
  1940. properties:
  1941. id: {$ref: '#/StringId'}
  1942. reset: {type: boolean, enum: [true]}
  1943. authVersion: {type: integer, minimum: 0}
  1944. ResetPasswordResponse:
  1945. type: object
  1946. additionalProperties: false
  1947. required: [code, message, data, requestId]
  1948. properties:
  1949. code: {type: string, enum: [OK]}
  1950. message: {type: string, enum: [success]}
  1951. data: {$ref: '#/ResetPasswordData'}
  1952. requestId: {type: string, format: uuid}
  1953. DocumentTagCollection:
  1954. type: object
  1955. additionalProperties: false
  1956. required: [items, total]
  1957. properties:
  1958. items:
  1959. type: array
  1960. items: {type: string}
  1961. description: 当前用户可见的主案标签,按Unicode升序。
  1962. total: {type: integer, minimum: 0}
  1963. DocumentTagsResponse:
  1964. type: object
  1965. additionalProperties: false
  1966. required: [code, message, data, requestId]
  1967. properties:
  1968. code: {type: string, enum: [OK]}
  1969. message: {type: string, enum: [success]}
  1970. data: {$ref: '#/DocumentTagCollection'}
  1971. requestId: {type: string, format: uuid}
  1972. DeptScope:
  1973. type: string
  1974. description: 权限矩阵部门范围:所属部门方案/其他部门方案(其他部门含所属部门子树外全部部门与无归属文档)。
  1975. enum: [OWN, OTHER]
  1976. RoleSummary:
  1977. type: object
  1978. additionalProperties: false
  1979. required: [id, roleName, sortNo, status, remark, isDefault, manageCategoryEdit, manageOrgEdit, manageUserEdit, manageSystemManage, manageAuditLog, manageRoleEdit, managedOrgId, memberCount, rowVersion]
  1980. properties:
  1981. id: {$ref: '#/StringId'}
  1982. roleName: {type: string, maxLength: 64}
  1983. sortNo: {type: integer, minimum: 0, maximum: 999999}
  1984. status: {$ref: '#/EnabledStatus'}
  1985. remark:
  1986. type: string
  1987. nullable: true
  1988. maxLength: 255
  1989. isDefault: {type: boolean}
  1990. manageCategoryEdit: {type: boolean, description: 分类编辑管理位(仅对ADMIN类别用户生效)}
  1991. manageOrgEdit: {type: boolean, description: 机构编辑管理位(仅对ADMIN类别用户生效)}
  1992. manageUserEdit: {type: boolean, description: 用户编辑管理位(仅对ADMIN类别用户生效)}
  1993. manageSystemManage: {type: boolean, description: 系统管理管理位(契约1.23,仅对ADMIN类别用户生效)}
  1994. manageAuditLog: {type: boolean, description: 日志审计管理位(契约1.23,仅对ADMIN类别用户生效)}
  1995. manageRoleEdit: {type: boolean, description: 角色编辑管理位(契约1.25,仅对ADMIN类别用户生效,全局生效不受锚点约束)}
  1996. managedOrgId:
  1997. type: string
  1998. nullable: true
  1999. description: 管理范围锚点(契约1.30);机构ID、"SELF"(跟随用户的管理范围设置,落库哨兵0)或null(全局)。
  2000. memberCount: {type: integer, minimum: 0}
  2001. rowVersion: {type: integer, minimum: 0}
  2002. RolePage:
  2003. type: object
  2004. additionalProperties: false
  2005. required: [items, page, pageSize, total, totalPages]
  2006. properties:
  2007. items:
  2008. type: array
  2009. items:
  2010. $ref: '#/RoleSummary'
  2011. page:
  2012. type: integer
  2013. minimum: 1
  2014. pageSize:
  2015. type: integer
  2016. minimum: 1
  2017. maximum: 100
  2018. total:
  2019. type: integer
  2020. minimum: 0
  2021. totalPages:
  2022. type: integer
  2023. minimum: 0
  2024. RolePageResponse:
  2025. type: object
  2026. additionalProperties: false
  2027. required: [code, message, data, requestId]
  2028. properties:
  2029. code: {type: string, enum: [OK]}
  2030. message: {type: string, enum: [success]}
  2031. data: {$ref: '#/RolePage'}
  2032. requestId: {type: string, format: uuid}
  2033. CreateRoleRequest:
  2034. type: object
  2035. additionalProperties: false
  2036. required: [roleName, sortNo, status, remark, isDefault, manageCategoryEdit, manageOrgEdit, manageUserEdit, manageSystemManage, manageAuditLog, manageRoleEdit, managedOrgId]
  2037. properties:
  2038. roleName: {type: string, minLength: 1, maxLength: 64}
  2039. sortNo: {type: integer, minimum: 0, maximum: 999999}
  2040. status: {$ref: '#/EnabledStatus'}
  2041. remark:
  2042. type: string
  2043. nullable: true
  2044. maxLength: 255
  2045. isDefault: {type: boolean}
  2046. manageCategoryEdit: {type: boolean}
  2047. manageOrgEdit: {type: boolean}
  2048. manageUserEdit: {type: boolean}
  2049. manageSystemManage: {type: boolean}
  2050. manageAuditLog: {type: boolean}
  2051. manageRoleEdit: {type: boolean}
  2052. managedOrgId:
  2053. type: string
  2054. nullable: true
  2055. description: 管理范围锚点(契约1.30);机构ID、"SELF"(跟随用户的管理范围设置,落库哨兵0)或null/空串(全局),机构ID须指向未删除机构。
  2056. UpdateRoleRequest:
  2057. type: object
  2058. additionalProperties: false
  2059. required: [roleName, sortNo, status, remark, isDefault, manageCategoryEdit, manageOrgEdit, manageUserEdit, manageSystemManage, manageAuditLog, manageRoleEdit, managedOrgId, rowVersion]
  2060. properties:
  2061. roleName: {type: string, minLength: 1, maxLength: 64}
  2062. sortNo: {type: integer, minimum: 0, maximum: 999999}
  2063. status: {$ref: '#/EnabledStatus'}
  2064. remark:
  2065. type: string
  2066. nullable: true
  2067. maxLength: 255
  2068. isDefault: {type: boolean}
  2069. manageCategoryEdit: {type: boolean}
  2070. manageOrgEdit: {type: boolean}
  2071. manageUserEdit: {type: boolean}
  2072. manageSystemManage: {type: boolean}
  2073. manageAuditLog: {type: boolean}
  2074. manageRoleEdit: {type: boolean}
  2075. managedOrgId:
  2076. type: string
  2077. nullable: true
  2078. description: 管理范围锚点(契约1.30);机构ID、"SELF"(跟随用户的管理范围设置,落库哨兵0)或null/空串(全局),机构ID须指向未删除机构。
  2079. rowVersion: {type: integer, minimum: 0}
  2080. RoleResponse:
  2081. type: object
  2082. additionalProperties: false
  2083. required: [code, message, data, requestId]
  2084. properties:
  2085. code: {type: string, enum: [OK]}
  2086. message: {type: string, enum: [success]}
  2087. data: {$ref: '#/RoleSummary'}
  2088. requestId: {type: string, format: uuid}
  2089. DeleteRoleData:
  2090. type: object
  2091. additionalProperties: false
  2092. required: [id, deleted]
  2093. properties:
  2094. id: {$ref: '#/StringId'}
  2095. deleted: {type: boolean, enum: [true]}
  2096. DeleteRoleResponse:
  2097. type: object
  2098. additionalProperties: false
  2099. required: [code, message, data, requestId]
  2100. properties:
  2101. code: {type: string, enum: [OK]}
  2102. message: {type: string, enum: [success]}
  2103. data: {$ref: '#/DeleteRoleData'}
  2104. requestId: {type: string, format: uuid}
  2105. RolePermissionRow:
  2106. type: object
  2107. additionalProperties: false
  2108. required: [securityLevel, deptScope, canView, canUpload, canDownload, canEdit, canDelete, canConfigPermission, canBindAttachment, canUnbindAttachment]
  2109. properties:
  2110. securityLevel: {$ref: '#/SecurityLevel'}
  2111. deptScope: {$ref: '#/DeptScope'}
  2112. canView: {type: boolean}
  2113. canUpload:
  2114. type: boolean
  2115. description: 上传位(契约1.31);仅 OWN 行有意义,OTHER 行恒为 false,服务端提交校验拒收 OTHER 行为 true 的载荷。
  2116. canDownload: {type: boolean}
  2117. canEdit: {type: boolean}
  2118. canDelete: {type: boolean}
  2119. canConfigPermission: {type: boolean}
  2120. canBindAttachment: {type: boolean}
  2121. canUnbindAttachment: {type: boolean}
  2122. RoleMatrixListResponse:
  2123. type: object
  2124. additionalProperties: false
  2125. required: [code, message, data, requestId]
  2126. properties:
  2127. code: {type: string, enum: [OK]}
  2128. message: {type: string, enum: [success]}
  2129. data:
  2130. type: array
  2131. minItems: 15
  2132. maxItems: 15
  2133. items:
  2134. $ref: '#/RolePermissionRow'
  2135. requestId: {type: string, format: uuid}
  2136. UpdateRolePermissionsRequest:
  2137. type: object
  2138. additionalProperties: false
  2139. required: [matrix, rowVersion]
  2140. properties:
  2141. matrix:
  2142. type: array
  2143. minItems: 15
  2144. maxItems: 15
  2145. items:
  2146. $ref: '#/RolePermissionRow'
  2147. rowVersion: {type: integer, minimum: 0}
  2148. RolePermissionsData:
  2149. type: object
  2150. additionalProperties: false
  2151. required: [id, matrix, rowVersion]
  2152. properties:
  2153. id: {$ref: '#/StringId'}
  2154. matrix:
  2155. type: array
  2156. minItems: 15
  2157. maxItems: 15
  2158. items:
  2159. $ref: '#/RolePermissionRow'
  2160. rowVersion: {type: integer, minimum: 0}
  2161. RolePermissionsResponse:
  2162. type: object
  2163. additionalProperties: false
  2164. required: [code, message, data, requestId]
  2165. properties:
  2166. code: {type: string, enum: [OK]}
  2167. message: {type: string, enum: [success]}
  2168. data: {$ref: '#/RolePermissionsData'}
  2169. requestId: {type: string, format: uuid}
  2170. RoleUsersData:
  2171. type: object
  2172. additionalProperties: false
  2173. required: [id, userIds]
  2174. properties:
  2175. id: {$ref: '#/StringId'}
  2176. userIds:
  2177. type: array
  2178. items: {$ref: '#/StringId'}
  2179. uniqueItems: true
  2180. rowVersion: {type: integer, minimum: 0}
  2181. RoleUsersResponse:
  2182. type: object
  2183. additionalProperties: false
  2184. required: [code, message, data, requestId]
  2185. properties:
  2186. code: {type: string, enum: [OK]}
  2187. message: {type: string, enum: [success]}
  2188. data: {$ref: '#/RoleUsersData'}
  2189. requestId: {type: string, format: uuid}
  2190. UpdateRoleUsersRequest:
  2191. type: object
  2192. additionalProperties: false
  2193. required: [userIds, rowVersion]
  2194. properties:
  2195. userIds:
  2196. type: array
  2197. items: {$ref: '#/StringId'}
  2198. uniqueItems: true
  2199. rowVersion: {type: integer, minimum: 0}
  2200. DocumentRelationPreset:
  2201. type: object
  2202. additionalProperties: false
  2203. required: [code, label, sortNo]
  2204. properties:
  2205. code: {type: string, minLength: 1, description: 预置类型稳定编码(仅用于前端下拉匹配,不落库)}
  2206. label: {type: string, minLength: 1, description: 预置关系文本(保存时直接写入relation_type)}
  2207. sortNo: {type: integer, minimum: 0}
  2208. DocumentMoveRequest:
  2209. type: object
  2210. additionalProperties: false
  2211. description: targetPosition与target二选一(非法组合返回400);主案可携带scopeCategoryId(分类子树语义),配套方案携带返回400。
  2212. properties:
  2213. targetPosition: {type: integer, minimum: 1}
  2214. target: {type: string, enum: [TOP, BOTTOM]}
  2215. scopeCategoryId: {$ref: '#/StringId'}
  2216. DocumentMoveResult:
  2217. type: object
  2218. additionalProperties: false
  2219. required: [position, total]
  2220. properties:
  2221. position: {type: integer, minimum: 1}
  2222. total: {type: integer, minimum: 0}
  2223. DocumentMoveResponse:
  2224. type: object
  2225. additionalProperties: false
  2226. required: [code, message, data, requestId]
  2227. properties:
  2228. code: {type: string, enum: [OK]}
  2229. message: {type: string, enum: [success]}
  2230. data: {$ref: '#/DocumentMoveResult'}
  2231. requestId: {type: string, format: uuid}
  2232. AttachmentMoveRequest:
  2233. type: object
  2234. additionalProperties: false
  2235. required: [mainPlanRowVersion]
  2236. description: targetPosition与target二选一(非法组合返回400);scopeAttachmentType限定页签类型范围。
  2237. properties:
  2238. mainPlanRowVersion: {type: integer, minimum: 0}
  2239. targetPosition: {type: integer, minimum: 1}
  2240. target: {type: string, enum: [TOP, BOTTOM]}
  2241. scopeAttachmentType: {$ref: '#/AttachmentType'}
  2242. AttachmentMoveResult:
  2243. type: object
  2244. additionalProperties: false
  2245. required: [position, total, mainPlanRowVersion]
  2246. properties:
  2247. position: {type: integer, minimum: 1}
  2248. total: {type: integer, minimum: 0}
  2249. mainPlanRowVersion: {type: integer, minimum: 0}
  2250. AttachmentMoveResponse:
  2251. type: object
  2252. additionalProperties: false
  2253. required: [code, message, data, requestId]
  2254. properties:
  2255. code: {type: string, enum: [OK]}
  2256. message: {type: string, enum: [success]}
  2257. data: {$ref: '#/AttachmentMoveResult'}
  2258. requestId: {type: string, format: uuid}
  2259. DocumentRelationPresetsResponse:
  2260. type: object
  2261. additionalProperties: false
  2262. required: [code, message, data, requestId]
  2263. properties:
  2264. code: {type: string, enum: [OK]}
  2265. message: {type: string, enum: [success]}
  2266. data:
  2267. type: object
  2268. additionalProperties: false
  2269. required: [presets]
  2270. properties:
  2271. presets:
  2272. type: array
  2273. items: {$ref: '#/DocumentRelationPreset'}
  2274. requestId: {type: string, format: uuid}
  2275. DocumentRelationItem:
  2276. type: object
  2277. additionalProperties: false
  2278. required: [relatedDocumentId, relatedDocumentName, relationType]
  2279. properties:
  2280. relatedDocumentId: {$ref: '#/StringId'}
  2281. relatedDocumentName: {type: string, minLength: 1}
  2282. relationType: {type: string, minLength: 1, maxLength: 64, description: 关系文本(预置label或用户自定义)}
  2283. DocumentRelationsResponse:
  2284. type: object
  2285. additionalProperties: false
  2286. required: [code, message, data, requestId]
  2287. properties:
  2288. code: {type: string, enum: [OK]}
  2289. message: {type: string, enum: [success]}
  2290. data:
  2291. type: object
  2292. additionalProperties: false
  2293. required: [items]
  2294. properties:
  2295. items:
  2296. type: array
  2297. items: {$ref: '#/DocumentRelationItem'}
  2298. requestId: {type: string, format: uuid}
  2299. UpdateDocumentRelationsRequest:
  2300. type: object
  2301. additionalProperties: false
  2302. required: [relations, rowVersion]
  2303. properties:
  2304. relations:
  2305. type: array
  2306. maxItems: 50
  2307. items:
  2308. type: object
  2309. additionalProperties: false
  2310. required: [relatedDocumentId, relationType]
  2311. properties:
  2312. relatedDocumentId: {$ref: '#/StringId'}
  2313. relationType: {type: string, minLength: 1, maxLength: 64}
  2314. uniqueItems: true
  2315. rowVersion: {type: integer, minimum: 0}
  2316. DocumentRelationsSaveResponse:
  2317. type: object
  2318. additionalProperties: false
  2319. required: [code, message, data, requestId]
  2320. properties:
  2321. code: {type: string, enum: [OK]}
  2322. message: {type: string, enum: [success]}
  2323. data:
  2324. type: object
  2325. additionalProperties: false
  2326. required: [relations, rowVersion]
  2327. properties:
  2328. relations:
  2329. type: array
  2330. items: {$ref: '#/DocumentRelationItem'}
  2331. rowVersion: {type: integer, minimum: 0}
  2332. requestId: {type: string, format: uuid}
  2333. IpEntrySummary:
  2334. type: object
  2335. additionalProperties: false
  2336. required: [id, ipValue, remark, rowVersion]
  2337. properties:
  2338. id: {$ref: '#/StringId'}
  2339. ipValue:
  2340. type: string
  2341. minLength: 1
  2342. maxLength: 64
  2343. description: 规范化后的精确IP、CIDR网段或IP范围文本(IPv6为压缩形式,网段主机位为0,范围为「起-止」两端同版本且起≤止)。
  2344. remark:
  2345. type: string
  2346. maxLength: 128
  2347. rowVersion: {type: integer, minimum: 0}
  2348. IpEntryPage:
  2349. type: object
  2350. additionalProperties: false
  2351. required: [items, page, pageSize, total, totalPages]
  2352. properties:
  2353. items:
  2354. type: array
  2355. items:
  2356. $ref: '#/IpEntrySummary'
  2357. page:
  2358. type: integer
  2359. minimum: 1
  2360. pageSize:
  2361. type: integer
  2362. minimum: 1
  2363. maximum: 100
  2364. total:
  2365. type: integer
  2366. minimum: 0
  2367. totalPages:
  2368. type: integer
  2369. minimum: 0
  2370. IpEntryPageResponse:
  2371. type: object
  2372. additionalProperties: false
  2373. required: [code, message, data, requestId]
  2374. properties:
  2375. code: {type: string, enum: [OK]}
  2376. message: {type: string, enum: [success]}
  2377. data: {$ref: '#/IpEntryPage'}
  2378. requestId: {type: string, format: uuid}
  2379. CreateIpEntryRequest:
  2380. type: object
  2381. additionalProperties: false
  2382. required: [ipValue, remark]
  2383. properties:
  2384. ipValue: {type: string, minLength: 1, maxLength: 64}
  2385. remark: {type: string, maxLength: 128}
  2386. UpdateIpEntryRequest:
  2387. type: object
  2388. additionalProperties: false
  2389. required: [ipValue, remark, rowVersion]
  2390. properties:
  2391. ipValue: {type: string, minLength: 1, maxLength: 64}
  2392. remark: {type: string, maxLength: 128}
  2393. rowVersion: {type: integer, minimum: 0}
  2394. IpEntryResponse:
  2395. type: object
  2396. additionalProperties: false
  2397. required: [code, message, data, requestId]
  2398. properties:
  2399. code: {type: string, enum: [OK]}
  2400. message: {type: string, enum: [success]}
  2401. data: {$ref: '#/IpEntrySummary'}
  2402. requestId: {type: string, format: uuid}
  2403. DeleteIpEntryData:
  2404. type: object
  2405. additionalProperties: false
  2406. required: [id, deleted]
  2407. properties:
  2408. id: {$ref: '#/StringId'}
  2409. deleted: {type: boolean, enum: [true]}
  2410. DeleteIpEntryResponse:
  2411. type: object
  2412. additionalProperties: false
  2413. required: [code, message, data, requestId]
  2414. properties:
  2415. code: {type: string, enum: [OK]}
  2416. message: {type: string, enum: [success]}
  2417. data: {$ref: '#/DeleteIpEntryData'}
  2418. requestId: {type: string, format: uuid}
  2419. OrgIpAssignmentListData:
  2420. type: object
  2421. additionalProperties: false
  2422. required: [ipEntryIds]
  2423. properties:
  2424. ipEntryIds:
  2425. type: array
  2426. items: {$ref: '#/StringId'}
  2427. uniqueItems: true
  2428. OrgIpAssignmentListResponse:
  2429. type: object
  2430. additionalProperties: false
  2431. required: [code, message, data, requestId]
  2432. properties:
  2433. code: {type: string, enum: [OK]}
  2434. message: {type: string, enum: [success]}
  2435. data: {$ref: '#/OrgIpAssignmentListData'}
  2436. requestId: {type: string, format: uuid}
  2437. UpdateOrgIpAssignmentsRequest:
  2438. type: object
  2439. additionalProperties: false
  2440. required: [ipEntryIds, rowVersion]
  2441. properties:
  2442. ipEntryIds:
  2443. type: array
  2444. items: {$ref: '#/StringId'}
  2445. uniqueItems: true
  2446. rowVersion: {type: integer, minimum: 0}
  2447. OrgIpAssignmentsData:
  2448. type: object
  2449. additionalProperties: false
  2450. required: [id, ipEntryIds, rowVersion]
  2451. properties:
  2452. id: {$ref: '#/StringId'}
  2453. ipEntryIds:
  2454. type: array
  2455. items: {$ref: '#/StringId'}
  2456. uniqueItems: true
  2457. rowVersion: {type: integer, minimum: 0}
  2458. OrgIpAssignmentsResponse:
  2459. type: object
  2460. additionalProperties: false
  2461. required: [code, message, data, requestId]
  2462. properties:
  2463. code: {type: string, enum: [OK]}
  2464. message: {type: string, enum: [success]}
  2465. data: {$ref: '#/OrgIpAssignmentsData'}
  2466. requestId: {type: string, format: uuid}
  2467. BackupTargetMode:
  2468. type: string
  2469. enum: [LOCAL, RSYNC]
  2470. description: 备份目标模式:LOCAL 本机目录(开发/单机),RSYNC rsync守护进程异机传输。
  2471. BackupTypeCode:
  2472. type: string
  2473. enum: [FULL, INCREMENTAL]
  2474. BackupTrigger:
  2475. type: string
  2476. enum: [MANUAL, SCHEDULE]
  2477. BackupPhase:
  2478. type: string
  2479. description: 备份任务阶段;null表示从未运行过任何任务。
  2480. enum: [SCANNING, EXPORTING_DB, COPYING, PUSHING, CLEANING, SUCCESS, FAILED]
  2481. BackupConfigView:
  2482. type: object
  2483. additionalProperties: false
  2484. required: [target_mode, local_path, rsync_url, schedule_enabled, schedule_time, full_interval_days, retain_full_count, rsync_password_set]
  2485. properties:
  2486. target_mode: {$ref: '#/BackupTargetMode'}
  2487. local_path: {type: string, maxLength: 1024, description: LOCAL模式的备份根目录;未配置为空串。}
  2488. rsync_url: {type: string, maxLength: 1024, description: RSYNC模式目标地址 rsync://user@host:873/module/;未配置为空串。}
  2489. schedule_enabled: {type: boolean, description: 定时备份开关。}
  2490. schedule_time: {type: string, pattern: '^([01][0-9]|2[0-3]):[0-5][0-9]$', description: 每日触发时刻(HH:MM,业务时区)。}
  2491. full_interval_days: {type: integer, minimum: 1, maximum: 365, description: 定时任务距最近全量超过该天数时自动升级为全量。}
  2492. retain_full_count: {type: integer, minimum: 1, maximum: 100, description: 保留的完整备份链数量;超出部分从最旧链开始清理。}
  2493. rsync_password_set: {type: boolean, description: rsync密码是否已设置;密码永不回显明文。}
  2494. UpdateBackupConfigRequest:
  2495. type: object
  2496. additionalProperties: false
  2497. required: [target_mode, local_path, rsync_url, rsync_password, schedule_enabled, schedule_time, full_interval_days, retain_full_count]
  2498. properties:
  2499. target_mode: {$ref: '#/BackupTargetMode'}
  2500. local_path: {type: string, nullable: true, maxLength: 1024}
  2501. rsync_url: {type: string, nullable: true, maxLength: 1024}
  2502. rsync_password:
  2503. type: string
  2504. nullable: true
  2505. maxLength: 256
  2506. writeOnly: true
  2507. description: rsync密码;null或空串表示保持已存密码不变(回显永不回明文)。
  2508. schedule_enabled: {type: boolean}
  2509. schedule_time: {type: string, pattern: '^([01][0-9]|2[0-3]):[0-5][0-9]$'}
  2510. full_interval_days: {type: integer, minimum: 1, maximum: 365}
  2511. retain_full_count: {type: integer, minimum: 1, maximum: 100}
  2512. BackupConfigResponse:
  2513. type: object
  2514. additionalProperties: false
  2515. required: [code, message, data, requestId]
  2516. properties:
  2517. code: {type: string, enum: [OK]}
  2518. message: {type: string, enum: [success]}
  2519. data: {$ref: '#/BackupConfigView'}
  2520. requestId: {type: string, format: uuid}
  2521. BackupJobStartRequest:
  2522. type: object
  2523. additionalProperties: false
  2524. required: [type]
  2525. properties:
  2526. type:
  2527. allOf: [{$ref: '#/BackupTypeCode'}]
  2528. description: INCREMENTAL无可用全量链时服务端自动升级为FULL。
  2529. BackupProgress:
  2530. type: object
  2531. additionalProperties: false
  2532. required: [backupId, type, trigger, phase, bytesTotal, bytesCopied, filesTotal, filesCopied, pushPercent, error, startedAt, finishedAt]
  2533. properties:
  2534. backupId:
  2535. type: string
  2536. nullable: true
  2537. description: 备份ID,形如 dms-bak-yyyyMMdd-HHmmss-F/-I;从未运行时为null。
  2538. type:
  2539. allOf: [{$ref: '#/BackupTypeCode'}]
  2540. nullable: true
  2541. trigger:
  2542. allOf: [{$ref: '#/BackupTrigger'}]
  2543. nullable: true
  2544. phase:
  2545. allOf: [{$ref: '#/BackupPhase'}]
  2546. nullable: true
  2547. bytesTotal: {type: integer, minimum: 0, description: 待传输字节总量(扫描/拷贝阶段累计)。}
  2548. bytesCopied: {type: integer, minimum: 0}
  2549. filesTotal: {type: integer, minimum: 0}
  2550. filesCopied: {type: integer, minimum: 0}
  2551. pushPercent:
  2552. type: integer
  2553. minimum: 0
  2554. maximum: 100
  2555. nullable: true
  2556. description: rsync整体推送进度百分比;仅RSYNC模式PUSHING阶段有值。
  2557. error:
  2558. type: string
  2559. nullable: true
  2560. description: 失败原因;仅FAILED阶段非null。
  2561. startedAt:
  2562. type: string
  2563. nullable: true
  2564. description: 开始时间(业务时区本地时间,yyyy-MM-dd HH:mm:ss,非UTC)。
  2565. finishedAt:
  2566. type: string
  2567. nullable: true
  2568. description: 结束时间(业务时区本地时间,yyyy-MM-dd HH:mm:ss,非UTC)。
  2569. BackupJobStartResponse:
  2570. type: object
  2571. additionalProperties: false
  2572. required: [code, message, data, requestId]
  2573. properties:
  2574. code: {type: string, enum: [OK]}
  2575. message: {type: string, enum: [success]}
  2576. data: {$ref: '#/BackupProgress'}
  2577. requestId: {type: string, format: uuid}
  2578. BackupCurrentJob:
  2579. allOf:
  2580. - $ref: '#/BackupProgress'
  2581. - type: object
  2582. required: [running]
  2583. properties:
  2584. running: {type: boolean, description: 当前是否有备份任务在执行。}
  2585. BackupJobCurrentResponse:
  2586. type: object
  2587. additionalProperties: false
  2588. required: [code, message, data, requestId]
  2589. properties:
  2590. code: {type: string, enum: [OK]}
  2591. message: {type: string, enum: [success]}
  2592. data: {$ref: '#/BackupCurrentJob'}
  2593. requestId: {type: string, format: uuid}
  2594. BackupCancelData:
  2595. type: object
  2596. additionalProperties: false
  2597. required: [canceled]
  2598. properties:
  2599. canceled: {type: boolean, description: 请求取消时是否存在运行中的任务。}
  2600. BackupCancelResponse:
  2601. type: object
  2602. additionalProperties: false
  2603. required: [code, message, data, requestId]
  2604. properties:
  2605. code: {type: string, enum: [OK]}
  2606. message: {type: string, enum: [success]}
  2607. data: {$ref: '#/BackupCancelData'}
  2608. requestId: {type: string, format: uuid}
  2609. BackupHistoryEntry:
  2610. type: object
  2611. additionalProperties: false
  2612. required: [id, type, parent, started_at, finished_at, database_file, database_size, transferred_files, transferred_bytes, storage_file_count, storage_total_bytes]
  2613. properties:
  2614. id: {type: string, description: 备份ID dms-bak-yyyyMMdd-HHmmss-F(全量)/-I(增量)。}
  2615. type: {$ref: '#/BackupTypeCode'}
  2616. parent:
  2617. type: string
  2618. nullable: true
  2619. description: 增量备份的前驱备份ID;全量为null。
  2620. started_at: {type: string, description: 开始时间(业务时区本地时间,yyyy-MM-dd HH:mm:ss)。}
  2621. finished_at: {type: string, description: 结束时间(业务时区本地时间,yyyy-MM-dd HH:mm:ss)。}
  2622. database_file: {type: string, description: 数据库导出文件在备份包内的相对路径。}
  2623. database_size: {type: integer, minimum: 0, description: 数据库导出文件字节数。}
  2624. transferred_files: {type: integer, minimum: 0, description: 本次实际传输的存储文件数(全量为全部,增量为差异)。}
  2625. transferred_bytes: {type: integer, minimum: 0}
  2626. storage_file_count: {type: integer, minimum: 0, description: 合并清单中的存储文件总数(链尾累计口径)。}
  2627. storage_total_bytes: {type: integer, minimum: 0}
  2628. BackupHistoryData:
  2629. type: object
  2630. additionalProperties: false
  2631. required: [entries]
  2632. properties:
  2633. entries:
  2634. type: array
  2635. items: {$ref: '#/BackupHistoryEntry'}
  2636. description: 按备份ID升序(即时间升序)排列。
  2637. BackupHistoryResponse:
  2638. type: object
  2639. additionalProperties: false
  2640. required: [code, message, data, requestId]
  2641. properties:
  2642. code: {type: string, enum: [OK]}
  2643. message: {type: string, enum: [success]}
  2644. data: {$ref: '#/BackupHistoryData'}
  2645. requestId: {type: string, format: uuid}
  2646. SystemCpuSnapshot:
  2647. type: object
  2648. additionalProperties: false
  2649. required: [percent, coreCount, loadAvgOneMinute]
  2650. properties:
  2651. percent: {type: number, minimum: 0, maximum: 100, description: CPU 总占用百分比(0.3 秒采样窗口)。}
  2652. coreCount: {type: integer, minimum: 0, description: 逻辑核数。}
  2653. loadAvgOneMinute:
  2654. type: number
  2655. nullable: true
  2656. description: 1 分钟平均负载(仅 POSIX,Windows 为 null)。
  2657. SystemMemorySnapshot:
  2658. type: object
  2659. additionalProperties: false
  2660. required: [totalBytes, usedBytes, availableBytes, usedPercent]
  2661. properties:
  2662. totalBytes: {type: integer, minimum: 0}
  2663. usedBytes: {type: integer, minimum: 0}
  2664. availableBytes: {type: integer, minimum: 0}
  2665. usedPercent: {type: number, minimum: 0, maximum: 100}
  2666. SystemSwapSnapshot:
  2667. type: object
  2668. additionalProperties: false
  2669. required: [totalBytes, usedBytes, usedPercent]
  2670. properties:
  2671. totalBytes: {type: integer, minimum: 0}
  2672. usedBytes: {type: integer, minimum: 0}
  2673. usedPercent: {type: number, minimum: 0, maximum: 100}
  2674. SystemDiskSnapshot:
  2675. type: object
  2676. additionalProperties: false
  2677. required: [device, mountpoint, fstype, totalBytes, usedBytes, freeBytes, usedPercent]
  2678. properties:
  2679. device: {type: string, description: 设备名。}
  2680. mountpoint: {type: string, description: 挂载点。}
  2681. fstype: {type: string, description: 文件系统类型。}
  2682. totalBytes: {type: integer, minimum: 0}
  2683. usedBytes: {type: integer, minimum: 0}
  2684. freeBytes: {type: integer, minimum: 0}
  2685. usedPercent: {type: number, minimum: 0, maximum: 100}
  2686. SystemMetricsCurrentData:
  2687. type: object
  2688. additionalProperties: false
  2689. required: [cpu, memory, swap, disks, bootAt]
  2690. properties:
  2691. cpu: {$ref: '#/SystemCpuSnapshot'}
  2692. memory: {$ref: '#/SystemMemorySnapshot'}
  2693. swap: {$ref: '#/SystemSwapSnapshot'}
  2694. disks:
  2695. type: array
  2696. items: {$ref: '#/SystemDiskSnapshot'}
  2697. description: 物理磁盘分区占用(不可读分区跳过)。
  2698. bootAt: {type: string, description: 开机时间(UTC,毫秒精度 Z 结尾)。}
  2699. SystemMetricsCurrentResponse:
  2700. type: object
  2701. additionalProperties: false
  2702. required: [code, message, data, requestId]
  2703. properties:
  2704. code: {type: string, enum: [OK]}
  2705. message: {type: string, enum: [success]}
  2706. data: {$ref: '#/SystemMetricsCurrentData'}
  2707. requestId: {type: string, format: uuid}
  2708. SystemMetricHistoryEntry:
  2709. type: object
  2710. additionalProperties: false
  2711. required: [sampledAt, cpuPercent, memUsedBytes, memTotalBytes]
  2712. properties:
  2713. sampledAt: {type: string, description: 采样时间(UTC,毫秒精度 Z 结尾)。}
  2714. cpuPercent:
  2715. type: number
  2716. nullable: true
  2717. description: CPU 百分比(采集失败为 null)。
  2718. memUsedBytes: {type: integer, minimum: 0}
  2719. memTotalBytes: {type: integer, minimum: 0}
  2720. SystemMetricHistoryData:
  2721. type: object
  2722. additionalProperties: false
  2723. required: [hours, entries]
  2724. properties:
  2725. hours: {type: integer, minimum: 1, description: 查询窗口小时数。}
  2726. entries:
  2727. type: array
  2728. items: {$ref: '#/SystemMetricHistoryEntry'}
  2729. description: 按时间升序排列。
  2730. SystemMetricHistoryResponse:
  2731. type: object
  2732. additionalProperties: false
  2733. required: [code, message, data, requestId]
  2734. properties:
  2735. code: {type: string, enum: [OK]}
  2736. message: {type: string, enum: [success]}
  2737. data: {$ref: '#/SystemMetricHistoryData'}
  2738. requestId: {type: string, format: uuid}
  2739. SystemProcessData:
  2740. type: object
  2741. additionalProperties: false
  2742. required: [pid, cpuPercent, memoryRssBytes, memoryVmsBytes, threadCount, startedAt, uptimeSeconds, pythonVersion]
  2743. properties:
  2744. pid: {type: integer, minimum: 1}
  2745. cpuPercent: {type: number, description: 进程 CPU 占用(按核数归一后的百分比)。}
  2746. memoryRssBytes: {type: integer, minimum: 0, description: 常驻内存。}
  2747. memoryVmsBytes: {type: integer, minimum: 0, description: 虚拟内存。}
  2748. threadCount: {type: integer, minimum: 1}
  2749. startedAt: {type: string, description: 进程启动时间(UTC,毫秒精度 Z 结尾)。}
  2750. uptimeSeconds: {type: integer, minimum: 0}
  2751. pythonVersion: {type: string, description: 运行时版本(Java 版返回 JDK 版本)。}
  2752. SystemProcessResponse:
  2753. type: object
  2754. additionalProperties: false
  2755. required: [code, message, data, requestId]
  2756. properties:
  2757. code: {type: string, enum: [OK]}
  2758. message: {type: string, enum: [success]}
  2759. data: {$ref: '#/SystemProcessData'}
  2760. requestId: {type: string, format: uuid}
  2761. SystemStorageUsageEntry:
  2762. type: object
  2763. additionalProperties: false
  2764. required: [directory, totalBytes, fileCount]
  2765. properties:
  2766. directory: {type: string, description: 存储子目录名(original/preview/extracted/temporary/quarantine/recycle/voucher)。}
  2767. totalBytes: {type: integer, minimum: 0}
  2768. fileCount: {type: integer, minimum: 0}
  2769. SystemStorageUsageData:
  2770. type: object
  2771. additionalProperties: false
  2772. required: [entries]
  2773. properties:
  2774. entries:
  2775. type: array
  2776. items: {$ref: '#/SystemStorageUsageEntry'}
  2777. SystemStorageUsageResponse:
  2778. type: object
  2779. additionalProperties: false
  2780. required: [code, message, data, requestId]
  2781. properties:
  2782. code: {type: string, enum: [OK]}
  2783. message: {type: string, enum: [success]}
  2784. data: {$ref: '#/SystemStorageUsageData'}
  2785. requestId: {type: string, format: uuid}
  2786. SystemConverterData:
  2787. type: object
  2788. additionalProperties: false
  2789. required: [available, executable, maxConcurrency, inFlight, successCount, failureCount, previewEnabled, timeoutSeconds]
  2790. properties:
  2791. available: {type: boolean, description: 转换器是否可用。}
  2792. executable: {type: string, description: LibreOffice 可执行文件路径。}
  2793. maxConcurrency: {type: integer, minimum: 1, description: 并发上限。}
  2794. inFlight: {type: integer, minimum: 0, description: 进行中的转换数。}
  2795. successCount: {type: integer, minimum: 0, description: 累计成功转换数(进程生命周期内)。}
  2796. failureCount: {type: integer, minimum: 0, description: 累计失败转换数(进程生命周期内)。}
  2797. previewEnabled: {type: boolean, description: 预览转换功能是否启用。}
  2798. timeoutSeconds: {type: integer, minimum: 1, description: 单次转换超时秒数。}
  2799. SystemConverterResponse:
  2800. type: object
  2801. additionalProperties: false
  2802. required: [code, message, data, requestId]
  2803. properties:
  2804. code: {type: string, enum: [OK]}
  2805. message: {type: string, enum: [success]}
  2806. data: {$ref: '#/SystemConverterData'}
  2807. requestId: {type: string, format: uuid}
  2808. SystemHealthItem:
  2809. type: object
  2810. additionalProperties: false
  2811. required: [item, ok, detail]
  2812. properties:
  2813. item:
  2814. type: string
  2815. enum: [DATABASE, STORAGE_WRITABLE, LIBREOFFICE, BACKUP_TARGET, STORAGE_ENCRYPTION]
  2816. ok: {type: boolean}
  2817. detail: {type: string, description: 失败原因或补充说明(成功为空/说明文字)。}
  2818. SystemHealthData:
  2819. type: object
  2820. additionalProperties: false
  2821. required: [items]
  2822. properties:
  2823. items:
  2824. type: array
  2825. items: {$ref: '#/SystemHealthItem'}
  2826. SystemHealthResponse:
  2827. type: object
  2828. additionalProperties: false
  2829. required: [code, message, data, requestId]
  2830. properties:
  2831. code: {type: string, enum: [OK]}
  2832. message: {type: string, enum: [success]}
  2833. data: {$ref: '#/SystemHealthData'}
  2834. requestId: {type: string, format: uuid}
  2835. SystemInfoData:
  2836. type: object
  2837. additionalProperties: false
  2838. required: [contractVersion, backendKind, runtimeVersion, operatingSystem, hostname, machineArch, databaseType, startedAt, uptimeSeconds, workingDirectory, storageRoot, backupConfigPath, envFilePath, logFilePath, monitoringEnabled]
  2839. properties:
  2840. contractVersion: {type: string, description: 接口契约版本(如 1.26.0)。}
  2841. backendKind: {type: string, enum: [PYTHON, JAVA], description: 后端实现类型。}
  2842. runtimeVersion: {type: string, description: 运行时版本(Python/JDK)。}
  2843. operatingSystem: {type: string}
  2844. hostname: {type: string}
  2845. machineArch: {type: string, description: 体系结构(x86_64/aarch64 等)。}
  2846. databaseType: {type: string, description: 数据库类型描述(DM (达梦)/MySQL 等)。}
  2847. startedAt: {type: string, description: 进程启动时间(UTC;psutil 缺失为空串)。}
  2848. uptimeSeconds: {type: integer, minimum: 0}
  2849. workingDirectory: {type: string}
  2850. storageRoot: {type: string}
  2851. backupConfigPath: {type: string}
  2852. envFilePath: {type: string}
  2853. logFilePath: {type: string, description: 运行日志文件路径(未启用为空串)。}
  2854. monitoringEnabled: {type: boolean, description: 监控信息展示开关(DMS_SYSTEM_MONITOR_ENABLED,缺省 false);false 时前端隐藏系统管理页维护操作之上的监控区块。}
  2855. SystemInfoResponse:
  2856. type: object
  2857. additionalProperties: false
  2858. required: [code, message, data, requestId]
  2859. properties:
  2860. code: {type: string, enum: [OK]}
  2861. message: {type: string, enum: [success]}
  2862. data: {$ref: '#/SystemInfoData'}
  2863. requestId: {type: string, format: uuid}
  2864. SystemRuntimeConfigEntry:
  2865. type: object
  2866. additionalProperties: false
  2867. required: [category, key, value, unit]
  2868. properties:
  2869. category: {type: string, description: 分类(认证/存储/上传/业务/转换/安全)。}
  2870. key: {type: string, description: 参数显示名。}
  2871. value:
  2872. description: 参数值(密钥类仅显示 已配置/未配置,永不回明文)。
  2873. unit: {type: string, description: 单位(无单位为空串)。}
  2874. SystemRuntimeConfigData:
  2875. type: object
  2876. additionalProperties: false
  2877. required: [entries]
  2878. properties:
  2879. entries:
  2880. type: array
  2881. items: {$ref: '#/SystemRuntimeConfigEntry'}
  2882. SystemRuntimeConfigResponse:
  2883. type: object
  2884. additionalProperties: false
  2885. required: [code, message, data, requestId]
  2886. properties:
  2887. code: {type: string, enum: [OK]}
  2888. message: {type: string, enum: [success]}
  2889. data: {$ref: '#/SystemRuntimeConfigData'}
  2890. requestId: {type: string, format: uuid}
  2891. SystemLogsData:
  2892. type: object
  2893. additionalProperties: false
  2894. required: [file, lines, truncated]
  2895. properties:
  2896. file: {type: string, description: 日志文件路径(未启用为空串)。}
  2897. lines:
  2898. type: array
  2899. items: {type: string}
  2900. description: 尾部日志行(级别过滤后截尾)。
  2901. truncated: {type: boolean, description: 是否经过截断。}
  2902. error:
  2903. type: string
  2904. description: 读取失败原因(成功时无此字段)。
  2905. SystemLogsResponse:
  2906. type: object
  2907. additionalProperties: false
  2908. required: [code, message, data, requestId]
  2909. properties:
  2910. code: {type: string, enum: [OK]}
  2911. message: {type: string, enum: [success]}
  2912. data: {$ref: '#/SystemLogsData'}
  2913. requestId: {type: string, format: uuid}
  2914. SystemPreviewCacheClearData:
  2915. type: object
  2916. additionalProperties: false
  2917. required: [removedFiles, removedBytes]
  2918. properties:
  2919. removedFiles: {type: integer, minimum: 0, description: 删除的预览文件数。}
  2920. removedBytes: {type: integer, minimum: 0, description: 释放的字节数。}
  2921. SystemPreviewCacheClearResponse:
  2922. type: object
  2923. additionalProperties: false
  2924. required: [code, message, data, requestId]
  2925. properties:
  2926. code: {type: string, enum: [OK]}
  2927. message: {type: string, enum: [success]}
  2928. data: {$ref: '#/SystemPreviewCacheClearData'}
  2929. requestId: {type: string, format: uuid}
  2930. SystemForceOfflineData:
  2931. type: object
  2932. additionalProperties: false
  2933. required: [userId, username, authVersion]
  2934. properties:
  2935. userId: {type: string, description: 目标用户ID(字符串形式)。}
  2936. username: {type: string}
  2937. authVersion: {type: integer, minimum: 1, description: 目标用户当前 auth_version(已 +1)。}
  2938. SystemForceOfflineResponse:
  2939. type: object
  2940. additionalProperties: false
  2941. required: [code, message, data, requestId]
  2942. properties:
  2943. code: {type: string, enum: [OK]}
  2944. message: {type: string, enum: [success]}
  2945. data: {$ref: '#/SystemForceOfflineData'}
  2946. requestId: {type: string, format: uuid}
  2947. BackupTestTargetData:
  2948. type: object
  2949. additionalProperties: false
  2950. required: [ok]
  2951. properties:
  2952. ok: {type: boolean, description: 目标是否可写。}
  2953. target:
  2954. type: string
  2955. description: 目标描述(成功时返回)。
  2956. error:
  2957. type: string
  2958. description: 失败原因(失败时返回)。
  2959. BackupTestTargetResponse:
  2960. type: object
  2961. additionalProperties: false
  2962. required: [code, message, data, requestId]
  2963. properties:
  2964. code: {type: string, enum: [OK]}
  2965. message: {type: string, enum: [success]}
  2966. data: {$ref: '#/BackupTestTargetData'}
  2967. requestId: {type: string, format: uuid}