candidate.json 24 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030
  1. {
  2. "schema_version": 1,
  3. "diagram_type": "erd",
  4. "meta": {
  5. "title": "恪澜通运营支撑系统 · 业务对象 / 领域模型",
  6. "subtitle": "核心业务实体与关系(各册『数据模型』章为真源)——按域分带,只画跨域主干关系;派生值与禁列不落库",
  7. "output": ".archify/domain-model-klt-bos-20261116-163406/klt-bos-domain-model.html",
  8. "locale": "zh-CN",
  9. "quality_profile": "showcase",
  10. "animation": "trace",
  11. "repository": {
  12. "url": "http://112.124.19.38:8080/klt-bos/klt-bos-service.git",
  13. "revision": "f47e4e70876f8debe5518774c0d7410715a4fec4",
  14. "link_mode": "local-only"
  15. },
  16. "legend": {
  17. "mode": "all",
  18. "entries": {
  19. "pk": {
  20. "label": "主键"
  21. },
  22. "fk": {
  23. "label": "外键"
  24. },
  25. "uk": {
  26. "label": "唯一键"
  27. },
  28. "one": {
  29. "label": "一"
  30. },
  31. "many": {
  32. "label": "多"
  33. },
  34. "optional": {
  35. "label": "可选"
  36. }
  37. }
  38. }
  39. },
  40. "layout": {
  41. "mode": "grid",
  42. "origin": [
  43. 24,
  44. 40
  45. ],
  46. "gapX": 22,
  47. "gapY": 60,
  48. "entityW": 224,
  49. "headerH": 40,
  50. "rowH": 22
  51. },
  52. "entities": [
  53. {
  54. "id": "customer",
  55. "label": "客户 customer",
  56. "tag": "客户域",
  57. "sublabel": "客户主档真源",
  58. "row": 0,
  59. "col": 0,
  60. "width": 244,
  61. "sources": [
  62. {
  63. "path": "docs/详细设计说明书/02-第2册-客户批量导入与分账号/02-数据模型本域表.md",
  64. "label": "客户§2.1"
  65. }
  66. ],
  67. "attributes": [
  68. {
  69. "name": "customer_id",
  70. "type": "varchar(32)",
  71. "key": "pk"
  72. },
  73. {
  74. "name": "customer_name",
  75. "type": "varchar(128)"
  76. },
  77. {
  78. "name": "subject_type",
  79. "type": "varchar(20)"
  80. },
  81. {
  82. "name": "operator_id",
  83. "type": "bigint"
  84. },
  85. {
  86. "name": "partner_id",
  87. "type": "bigint"
  88. },
  89. {
  90. "name": "acct_status",
  91. "type": "varchar(20)"
  92. }
  93. ]
  94. },
  95. {
  96. "id": "sub_account",
  97. "label": "分账号 sub_account",
  98. "tag": "客户域",
  99. "sublabel": "登录账号走平台管线",
  100. "row": 0,
  101. "col": 1,
  102. "width": 266,
  103. "sources": [
  104. {
  105. "path": "docs/详细设计说明书/02-第2册-客户批量导入与分账号/02-数据模型本域表.md",
  106. "label": "客户§2.3"
  107. }
  108. ],
  109. "attributes": [
  110. {
  111. "name": "sub_account_id",
  112. "type": "bigint",
  113. "key": "pk"
  114. },
  115. {
  116. "name": "customer_id",
  117. "type": "varchar(32)",
  118. "key": "fk",
  119. "references": "customer.customer_id"
  120. },
  121. {
  122. "name": "login_name",
  123. "type": "varchar(64)",
  124. "key": "uk"
  125. },
  126. {
  127. "name": "user_id",
  128. "type": "bigint"
  129. },
  130. {
  131. "name": "network_account_name",
  132. "type": "varchar(64)"
  133. },
  134. {
  135. "name": "status",
  136. "type": "varchar(16)"
  137. }
  138. ]
  139. },
  140. {
  141. "id": "import_batch",
  142. "label": "导入批次 import_batch",
  143. "tag": "客户域",
  144. "sublabel": "续传与按批导出依据",
  145. "row": 0,
  146. "col": 2,
  147. "width": 240,
  148. "sources": [
  149. {
  150. "path": "docs/详细设计说明书/02-第2册-客户批量导入与分账号/02-数据模型本域表.md",
  151. "label": "客户§2.4"
  152. }
  153. ],
  154. "attributes": [
  155. {
  156. "name": "batch_id",
  157. "type": "varchar(16)",
  158. "key": "pk"
  159. },
  160. {
  161. "name": "importer_user_id",
  162. "type": "bigint"
  163. },
  164. {
  165. "name": "status",
  166. "type": "varchar(20)"
  167. },
  168. {
  169. "name": "total_rows",
  170. "type": "int"
  171. },
  172. {
  173. "name": "success_rows",
  174. "type": "int"
  175. },
  176. {
  177. "name": "failed_rows",
  178. "type": "int"
  179. }
  180. ]
  181. },
  182. {
  183. "id": "contract",
  184. "label": "合同 contract",
  185. "tag": "订单域",
  186. "sublabel": "可见性继承签约客户",
  187. "row": 1,
  188. "col": 1,
  189. "width": 236,
  190. "sources": [
  191. {
  192. "path": "docs/详细设计说明书/03-第3册-套餐合同与订单/02-数据模型本域表.md",
  193. "label": "订单§2.2"
  194. }
  195. ],
  196. "attributes": [
  197. {
  198. "name": "contract_id",
  199. "type": "bigint",
  200. "key": "pk"
  201. },
  202. {
  203. "name": "contract_no",
  204. "type": "varchar(48)",
  205. "key": "uk"
  206. },
  207. {
  208. "name": "customer_id",
  209. "type": "varchar(32)",
  210. "key": "fk",
  211. "references": "customer.customer_id"
  212. },
  213. {
  214. "name": "external_no",
  215. "type": "varchar(64)"
  216. },
  217. {
  218. "name": "source",
  219. "type": "varchar(16)"
  220. },
  221. {
  222. "name": "start_date",
  223. "type": "date"
  224. },
  225. {
  226. "name": "end_date",
  227. "type": "date"
  228. }
  229. ]
  230. },
  231. {
  232. "id": "contract_service_item",
  233. "label": "服务构成条目",
  234. "tag": "订单域",
  235. "sublabel": "contract_service_item",
  236. "row": 1,
  237. "col": 3,
  238. "width": 250,
  239. "sources": [
  240. {
  241. "path": "docs/详细设计说明书/03-第3册-套餐合同与订单/02-数据模型本域表.md",
  242. "label": "订单§2.2"
  243. }
  244. ],
  245. "attributes": [
  246. {
  247. "name": "item_id",
  248. "type": "bigint",
  249. "key": "pk"
  250. },
  251. {
  252. "name": "contract_id",
  253. "type": "bigint",
  254. "key": "fk",
  255. "references": "contract.contract_id"
  256. },
  257. {
  258. "name": "item_kind",
  259. "type": "varchar(16)"
  260. },
  261. {
  262. "name": "plan_id",
  263. "type": "bigint",
  264. "key": "fk",
  265. "references": "plan.plan_id"
  266. },
  267. {
  268. "name": "annual_price_cents",
  269. "type": "bigint"
  270. },
  271. {
  272. "name": "line_exits",
  273. "type": "text[]"
  274. }
  275. ]
  276. },
  277. {
  278. "id": "plan",
  279. "label": "套餐档位 plan",
  280. "tag": "订单域",
  281. "sublabel": "固定档/自定义档同表",
  282. "row": 1,
  283. "col": 2,
  284. "width": 244,
  285. "sources": [
  286. {
  287. "path": "docs/详细设计说明书/03-第3册-套餐合同与订单/02-数据模型本域表.md",
  288. "label": "订单§2.1"
  289. }
  290. ],
  291. "attributes": [
  292. {
  293. "name": "plan_id",
  294. "type": "bigint",
  295. "key": "pk"
  296. },
  297. {
  298. "name": "plan_kind",
  299. "type": "varchar(16)"
  300. },
  301. {
  302. "name": "customer_id",
  303. "type": "varchar(32)",
  304. "key": "fk",
  305. "references": "customer.customer_id"
  306. },
  307. {
  308. "name": "use_category",
  309. "type": "varchar(20)"
  310. },
  311. {
  312. "name": "annual_price_cents",
  313. "type": "bigint"
  314. },
  315. {
  316. "name": "sub_account_quota",
  317. "type": "int"
  318. }
  319. ]
  320. },
  321. {
  322. "id": "subscription",
  323. "label": "订单 subscription",
  324. "tag": "订单域",
  325. "sublabel": "升降配/叠加同表",
  326. "row": 1,
  327. "col": 0,
  328. "width": 266,
  329. "sources": [
  330. {
  331. "path": "docs/详细设计说明书/03-第3册-套餐合同与订单/02-数据模型本域表.md",
  332. "label": "订单§2.3"
  333. }
  334. ],
  335. "attributes": [
  336. {
  337. "name": "subscription_id",
  338. "type": "bigint",
  339. "key": "pk"
  340. },
  341. {
  342. "name": "customer_id",
  343. "type": "varchar(32)",
  344. "key": "fk",
  345. "references": "customer.customer_id"
  346. },
  347. {
  348. "name": "contract_id",
  349. "type": "bigint",
  350. "key": "fk",
  351. "references": "contract.contract_id"
  352. },
  353. {
  354. "name": "plan_id",
  355. "type": "bigint",
  356. "key": "fk",
  357. "references": "plan.plan_id"
  358. },
  359. {
  360. "name": "sub_mode",
  361. "type": "varchar(16)"
  362. },
  363. {
  364. "name": "monthly_settle_cents",
  365. "type": "bigint"
  366. },
  367. {
  368. "name": "actual_opened_at",
  369. "type": "timestamptz"
  370. },
  371. {
  372. "name": "replaces_subscription_id",
  373. "type": "bigint"
  374. }
  375. ]
  376. },
  377. {
  378. "id": "ticket_backfill",
  379. "label": "回填批次 ticket_backfill",
  380. "tag": "工单域",
  381. "sublabel": "一单一行·整体覆盖",
  382. "row": 2,
  383. "col": 2,
  384. "width": 246,
  385. "sources": [
  386. {
  387. "path": "docs/详细设计说明书/05-第5册-工单与开停交付/02-数据模型本域表.md",
  388. "label": "工单§2.4"
  389. }
  390. ],
  391. "attributes": [
  392. {
  393. "name": "backfill_id",
  394. "type": "bigint",
  395. "key": "pk"
  396. },
  397. {
  398. "name": "ticket_id",
  399. "type": "bigint",
  400. "key": "fk",
  401. "references": "ticket.ticket_id"
  402. },
  403. {
  404. "name": "exec_conclusion",
  405. "type": "varchar(16)"
  406. },
  407. {
  408. "name": "actual_opened_date",
  409. "type": "date"
  410. },
  411. {
  412. "name": "stop_done_date",
  413. "type": "date"
  414. },
  415. {
  416. "name": "source",
  417. "type": "varchar(16)"
  418. }
  419. ]
  420. },
  421. {
  422. "id": "ticket",
  423. "label": "工单 ticket",
  424. "tag": "工单域",
  425. "sublabel": "六类工单同表·七状态",
  426. "row": 2,
  427. "col": 0,
  428. "width": 250,
  429. "sources": [
  430. {
  431. "path": "docs/详细设计说明书/05-第5册-工单与开停交付/02-数据模型本域表.md",
  432. "label": "工单§2.1"
  433. }
  434. ],
  435. "attributes": [
  436. {
  437. "name": "ticket_id",
  438. "type": "bigint",
  439. "key": "pk"
  440. },
  441. {
  442. "name": "ticket_no",
  443. "type": "varchar(32)",
  444. "key": "uk"
  445. },
  446. {
  447. "name": "ticket_type",
  448. "type": "varchar(20)"
  449. },
  450. {
  451. "name": "status",
  452. "type": "varchar(16)"
  453. },
  454. {
  455. "name": "customer_id",
  456. "type": "varchar(32)",
  457. "key": "fk",
  458. "references": "customer.customer_id"
  459. },
  460. {
  461. "name": "subscription_id",
  462. "type": "bigint",
  463. "key": "fk",
  464. "references": "subscription.subscription_id"
  465. },
  466. {
  467. "name": "assign_team_id",
  468. "type": "bigint"
  469. },
  470. {
  471. "name": "assignee_user_id",
  472. "type": "bigint"
  473. }
  474. ]
  475. },
  476. {
  477. "id": "ticket_open_stop",
  478. "label": "开停记录 ticket_open_stop",
  479. "tag": "工单域",
  480. "sublabel": "计费事实源·一单一记录",
  481. "row": 2,
  482. "col": 3,
  483. "width": 250,
  484. "sources": [
  485. {
  486. "path": "docs/详细设计说明书/05-第5册-工单与开停交付/02-数据模型本域表.md",
  487. "label": "工单§2.2"
  488. }
  489. ],
  490. "attributes": [
  491. {
  492. "name": "open_stop_id",
  493. "type": "bigint",
  494. "key": "pk"
  495. },
  496. {
  497. "name": "ticket_id",
  498. "type": "bigint",
  499. "key": "fk",
  500. "references": "ticket.ticket_id"
  501. },
  502. {
  503. "name": "customer_id",
  504. "type": "varchar(32)",
  505. "key": "fk",
  506. "references": "customer.customer_id"
  507. },
  508. {
  509. "name": "action",
  510. "type": "varchar(16)"
  511. },
  512. {
  513. "name": "exec_status",
  514. "type": "varchar(16)"
  515. },
  516. {
  517. "name": "exec_date",
  518. "type": "date"
  519. }
  520. ]
  521. },
  522. {
  523. "id": "ticket_completion",
  524. "label": "竣工记录 ticket_completion",
  525. "tag": "工单域",
  526. "sublabel": "一单一次·回传与回执",
  527. "row": 2,
  528. "col": 1,
  529. "width": 250,
  530. "sources": [
  531. {
  532. "path": "docs/详细设计说明书/05-第5册-工单与开停交付/02-数据模型本域表.md",
  533. "label": "工单§2.5"
  534. }
  535. ],
  536. "attributes": [
  537. {
  538. "name": "completion_id",
  539. "type": "bigint",
  540. "key": "pk"
  541. },
  542. {
  543. "name": "ticket_id",
  544. "type": "bigint",
  545. "key": "fk",
  546. "references": "ticket.ticket_id"
  547. },
  548. {
  549. "name": "completion_no",
  550. "type": "varchar(32)",
  551. "key": "uk"
  552. },
  553. {
  554. "name": "mode",
  555. "type": "varchar(16)"
  556. },
  557. {
  558. "name": "pushed_at",
  559. "type": "date"
  560. },
  561. {
  562. "name": "receipt_at",
  563. "type": "timestamptz"
  564. }
  565. ]
  566. },
  567. {
  568. "id": "billing_receivable",
  569. "label": "应收结算 billing_receivable",
  570. "tag": "对账域",
  571. "sublabel": "一条=订单×自然月",
  572. "row": 3,
  573. "col": 0,
  574. "width": 258,
  575. "sources": [
  576. {
  577. "path": "docs/详细设计说明书/06-第6册-计费与对账出账/02-数据模型本域表.md",
  578. "label": "对账§2.1"
  579. }
  580. ],
  581. "attributes": [
  582. {
  583. "name": "period",
  584. "type": "varchar(7)",
  585. "key": "pk"
  586. },
  587. {
  588. "name": "subscription_id",
  589. "type": "bigint",
  590. "key": "pk"
  591. },
  592. {
  593. "name": "customer_id",
  594. "type": "bigint"
  595. },
  596. {
  597. "name": "billing_days",
  598. "type": "smallint"
  599. },
  600. {
  601. "name": "receivable_cents",
  602. "type": "bigint"
  603. },
  604. {
  605. "name": "share_base_cents",
  606. "type": "bigint"
  607. },
  608. {
  609. "name": "cost_snapshot",
  610. "type": "jsonb"
  611. }
  612. ]
  613. },
  614. {
  615. "id": "bill_detail",
  616. "label": "账单明细 bill_detail",
  617. "tag": "对账域",
  618. "sublabel": "分成方×订单×自然月",
  619. "row": 3,
  620. "col": 1,
  621. "width": 250,
  622. "sources": [
  623. {
  624. "path": "docs/详细设计说明书/06-第6册-计费与对账出账/02-数据模型本域表.md",
  625. "label": "对账§2.3"
  626. }
  627. ],
  628. "attributes": [
  629. {
  630. "name": "detail_id",
  631. "type": "bigint",
  632. "key": "pk"
  633. },
  634. {
  635. "name": "batch_id",
  636. "type": "bigint",
  637. "key": "fk",
  638. "references": "reconcile_batch.batch_id"
  639. },
  640. {
  641. "name": "period",
  642. "type": "varchar(7)"
  643. },
  644. {
  645. "name": "holder_type",
  646. "type": "varchar(16)"
  647. },
  648. {
  649. "name": "holder_id",
  650. "type": "bigint"
  651. },
  652. {
  653. "name": "share_amount_cents",
  654. "type": "bigint"
  655. },
  656. {
  657. "name": "status",
  658. "type": "varchar(16)"
  659. }
  660. ]
  661. },
  662. {
  663. "id": "reconcile_batch",
  664. "label": "对账批次 reconcile_batch",
  665. "tag": "对账域",
  666. "sublabel": "分成方×已结束自然月",
  667. "row": 3,
  668. "col": 2,
  669. "width": 246,
  670. "sources": [
  671. {
  672. "path": "docs/详细设计说明书/06-第6册-计费与对账出账/02-数据模型本域表.md",
  673. "label": "对账§2.4"
  674. }
  675. ],
  676. "attributes": [
  677. {
  678. "name": "batch_id",
  679. "type": "bigint",
  680. "key": "pk"
  681. },
  682. {
  683. "name": "batch_no",
  684. "type": "varchar(24)",
  685. "key": "uk"
  686. },
  687. {
  688. "name": "holder_type",
  689. "type": "varchar(16)"
  690. },
  691. {
  692. "name": "holder_id",
  693. "type": "bigint"
  694. },
  695. {
  696. "name": "period",
  697. "type": "varchar(7)"
  698. },
  699. {
  700. "name": "status",
  701. "type": "varchar(16)"
  702. },
  703. {
  704. "name": "trigger_type",
  705. "type": "varchar(16)"
  706. }
  707. ]
  708. },
  709. {
  710. "id": "cost_item",
  711. "label": "成本项 cost_item",
  712. "tag": "分成域",
  713. "sublabel": "全局目录·无金额列",
  714. "row": 4,
  715. "col": 0,
  716. "width": 232,
  717. "sources": [
  718. {
  719. "path": "docs/详细设计说明书/04-第4册-分成与成本规则/02-数据模型本域表.md",
  720. "label": "分成§2.1"
  721. }
  722. ],
  723. "attributes": [
  724. {
  725. "name": "cost_item_id",
  726. "type": "bigint",
  727. "key": "pk"
  728. },
  729. {
  730. "name": "item_name",
  731. "type": "varchar(64)",
  732. "key": "uk"
  733. },
  734. {
  735. "name": "category",
  736. "type": "varchar(16)"
  737. },
  738. {
  739. "name": "billing_unit",
  740. "type": "varchar(16)"
  741. },
  742. {
  743. "name": "deduct_from_base",
  744. "type": "boolean"
  745. }
  746. ]
  747. },
  748. {
  749. "id": "cost_amount",
  750. "label": "组合金额 cost_amount",
  751. "tag": "分成域",
  752. "sublabel": "省份×运营商×成本项",
  753. "row": 4,
  754. "col": 1,
  755. "width": 238,
  756. "sources": [
  757. {
  758. "path": "docs/详细设计说明书/04-第4册-分成与成本规则/02-数据模型本域表.md",
  759. "label": "分成§2.1"
  760. }
  761. ],
  762. "attributes": [
  763. {
  764. "name": "id",
  765. "type": "bigint",
  766. "key": "pk"
  767. },
  768. {
  769. "name": "province_node_id",
  770. "type": "bigint"
  771. },
  772. {
  773. "name": "operator_id",
  774. "type": "varchar(64)"
  775. },
  776. {
  777. "name": "cost_item_id",
  778. "type": "bigint",
  779. "key": "fk",
  780. "references": "cost_item.cost_item_id"
  781. },
  782. {
  783. "name": "amount_cents",
  784. "type": "bigint"
  785. }
  786. ]
  787. },
  788. {
  789. "id": "bos_data_scope",
  790. "label": "数据范围 bos_data_scope",
  791. "tag": "横切·总则",
  792. "sublabel": "判权谓词·并集语义",
  793. "row": 5,
  794. "col": 0,
  795. "width": 250,
  796. "sources": [
  797. {
  798. "path": "docs/详细设计说明书/00-总则与全局约定/05-数据建模总则与跨域表.md",
  799. "label": "总则§5.2"
  800. }
  801. ],
  802. "attributes": [
  803. {
  804. "name": "id",
  805. "type": "bigint",
  806. "key": "pk"
  807. },
  808. {
  809. "name": "holder_type",
  810. "type": "varchar(16)"
  811. },
  812. {
  813. "name": "holder_id",
  814. "type": "bigint"
  815. },
  816. {
  817. "name": "target_type",
  818. "type": "varchar(16)"
  819. },
  820. {
  821. "name": "target_id",
  822. "type": "varchar(64)"
  823. }
  824. ]
  825. },
  826. {
  827. "id": "bos_audit_log",
  828. "label": "审计日志 bos_audit_log",
  829. "tag": "横切·总则",
  830. "sublabel": "只追加·保留≥3年",
  831. "row": 5,
  832. "col": 1,
  833. "width": 250,
  834. "sources": [
  835. {
  836. "path": "docs/详细设计说明书/00-总则与全局约定/05-数据建模总则与跨域表.md",
  837. "label": "总则§5.4"
  838. }
  839. ],
  840. "attributes": [
  841. {
  842. "name": "audit_id",
  843. "type": "bigint",
  844. "key": "pk"
  845. },
  846. {
  847. "name": "occurred_at",
  848. "type": "timestamptz"
  849. },
  850. {
  851. "name": "actor_user_id",
  852. "type": "bigint"
  853. },
  854. {
  855. "name": "action",
  856. "type": "varchar(64)"
  857. },
  858. {
  859. "name": "object_type",
  860. "type": "varchar(64)"
  861. },
  862. {
  863. "name": "object_id",
  864. "type": "varchar(64)"
  865. }
  866. ]
  867. }
  868. ],
  869. "relationships": [
  870. {
  871. "id": "customer_sub",
  872. "from": "sub_account",
  873. "to": "customer",
  874. "label": "分账号",
  875. "fromCardinality": "many",
  876. "toCardinality": "one",
  877. "identifying": true
  878. },
  879. {
  880. "id": "customer_contract",
  881. "from": "contract",
  882. "to": "customer",
  883. "label": "客户",
  884. "fromCardinality": "many",
  885. "toCardinality": "one",
  886. "identifying": true
  887. },
  888. {
  889. "id": "contract_item",
  890. "from": "contract_service_item",
  891. "to": "contract",
  892. "label": "服务构成",
  893. "fromCardinality": "many",
  894. "toCardinality": "one",
  895. "identifying": true
  896. },
  897. {
  898. "id": "plan_item",
  899. "from": "contract_service_item",
  900. "to": "plan",
  901. "label": "档位",
  902. "fromCardinality": "many",
  903. "toCardinality": "one",
  904. "identifying": false,
  905. "fromOptional": true
  906. },
  907. {
  908. "id": "customer_order",
  909. "from": "subscription",
  910. "to": "customer",
  911. "label": "订单主体",
  912. "fromCardinality": "many",
  913. "toCardinality": "one",
  914. "identifying": true
  915. },
  916. {
  917. "id": "contract_order",
  918. "from": "subscription",
  919. "to": "contract",
  920. "label": "合同",
  921. "fromCardinality": "many",
  922. "toCardinality": "one",
  923. "identifying": true
  924. },
  925. {
  926. "id": "plan_order",
  927. "from": "subscription",
  928. "to": "plan",
  929. "label": "订单挂档位",
  930. "fromCardinality": "many",
  931. "toCardinality": "one",
  932. "identifying": true
  933. },
  934. {
  935. "id": "costitem_amount",
  936. "from": "cost_amount",
  937. "to": "cost_item",
  938. "label": "定价",
  939. "fromCardinality": "many",
  940. "toCardinality": "one",
  941. "identifying": true
  942. },
  943. {
  944. "id": "order_ticket",
  945. "from": "ticket",
  946. "to": "subscription",
  947. "label": "订单",
  948. "fromCardinality": "many",
  949. "toCardinality": "one",
  950. "identifying": false,
  951. "fromOptional": true
  952. },
  953. {
  954. "id": "ticket_backfill",
  955. "from": "ticket_backfill",
  956. "to": "ticket",
  957. "label": "回填",
  958. "fromCardinality": "one",
  959. "toCardinality": "one",
  960. "identifying": true
  961. },
  962. {
  963. "id": "ticket_openstop",
  964. "from": "ticket_open_stop",
  965. "to": "ticket",
  966. "label": "一单一开停记录",
  967. "fromCardinality": "one",
  968. "toCardinality": "one",
  969. "identifying": true
  970. },
  971. {
  972. "id": "ticket_completion",
  973. "from": "ticket_completion",
  974. "to": "ticket",
  975. "label": "竣工",
  976. "fromCardinality": "one",
  977. "toCardinality": "one",
  978. "identifying": true
  979. },
  980. {
  981. "id": "receivable_detail",
  982. "from": "bill_detail",
  983. "to": "billing_receivable",
  984. "label": "明细",
  985. "fromCardinality": "many",
  986. "toCardinality": "one",
  987. "identifying": true
  988. },
  989. {
  990. "id": "batch_detail",
  991. "from": "bill_detail",
  992. "to": "reconcile_batch",
  993. "label": "批次",
  994. "fromCardinality": "many",
  995. "toCardinality": "one",
  996. "identifying": true
  997. }
  998. ],
  999. "cards": [
  1000. {
  1001. "dot": "cyan",
  1002. "title": "四条主干",
  1003. "items": [
  1004. "客户主数据带:客户 → 分账号 / 合同 / 订单;客户主账号不是新表,是账号绑定表 subject_type=customer 的行。",
  1005. "商品契约带:档位 + 合同服务构成条目 → 订单;订单一律挂档位,升降配只是新增一行 + replaces 边(自引用未在图中展开)。",
  1006. "履约带:订单 → 工单 → 开停记录 / 回填 / 竣工;三写同事务改写服务开通状态、实际开通日与工单完成。",
  1007. "出账带:订单 × 自然月 → 应收 → 账单明细 → 出账批次;账单明细物化以承载『批次覆盖』关系。"
  1008. ]
  1009. },
  1010. {
  1011. "dot": "amber",
  1012. "title": "故意缺列(缺列是设计)",
  1013. "items": [
  1014. "订单无 region_id / ticket_id / billed_amount:区域在资源树、工单与账单各属他册、出账现取。",
  1015. "应收无 reconcile_status / 分成金额列:出账状态由批次派生,分成金额单源在账单明细。",
  1016. "成本项定义无任何金额列与归属维度列(A23 黑名单);逐客户分成规则表 share_rule 已作废。",
  1017. "工单无金额列与流程引擎引用;回填/竣工不存 PIN/CPID 明文与脱敏副本。"
  1018. ]
  1019. },
  1020. {
  1021. "dot": "emerald",
  1022. "title": "关键关系口径",
  1023. "items": [
  1024. "开停记录是第 6 册唯一开停事实源:按分账号×自然日推在期天数,不读工单状态。",
  1025. "一条应收=一份订单×一个自然月,主键即幂等键;账单明细一条=分成方×订单×自然月。",
  1026. "虚线为可选/非标识关系;同一订单至多被升降配替代一次(replaces 自引用见卡片说明,未画出以免自环)。"
  1027. ]
  1028. }
  1029. ]
  1030. }