agentic-domain-document 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/.tbls.yml +201 -0
  2. package/CHANGELOG.md +68 -0
  3. package/README.md +313 -0
  4. package/agent/agent.manifest.json +8 -0
  5. package/agent/capabilities/document-authoring.json +21 -0
  6. package/agent/capabilities/document-block.json +22 -0
  7. package/agent/capabilities/document-toc.json +21 -0
  8. package/agent/capabilities/document-validation.json +21 -0
  9. package/agent/examples/document-quality-examples.md +153 -0
  10. package/agent/examples/examples.md +172 -0
  11. package/agent/guides/10-document-authoring-guide.md +28 -0
  12. package/agent/guides/20-domain-boundary-guide.md +41 -0
  13. package/agent/guides/30-authoring-policy-guide.md +40 -0
  14. package/agent/guides/40-toc-authoring-guide.md +73 -0
  15. package/agent/guides/50-content-block-guide.md +57 -0
  16. package/agent/guides/51-paragraph-authoring-guide.md +68 -0
  17. package/agent/guides/52-table-authoring-guide.md +73 -0
  18. package/agent/guides/53-diagram-figure-authoring-guide.md +75 -0
  19. package/agent/guides/70-korean-writing-style-guide.md +65 -0
  20. package/agent/instructions/00-runtime-behavior.md +17 -0
  21. package/agent/instructions/10-scope-and-boundary.md +27 -0
  22. package/agent/instructions/20-task-procedures.md +69 -0
  23. package/agent/instructions/30-must-and-must-not.md +34 -0
  24. package/agent/resource-index.json +185 -0
  25. package/agent/resource-selection.json +205 -0
  26. package/agent/routing.json +34 -0
  27. package/agent/sources/reference-mapping.md +53 -0
  28. package/agent/validation/document-validation-rules.md +73 -0
  29. package/dist/agent/document-agent-contribution.d.ts +15 -0
  30. package/dist/agent/document-agent-contribution.d.ts.map +1 -0
  31. package/dist/agent/document-agent-contribution.js +39 -0
  32. package/dist/agent/document-agent-contribution.js.map +1 -0
  33. package/dist/agent/index.d.ts +2 -0
  34. package/dist/agent/index.d.ts.map +1 -0
  35. package/dist/agent/index.js +2 -0
  36. package/dist/agent/index.js.map +1 -0
  37. package/dist/database.d.ts +8 -0
  38. package/dist/database.d.ts.map +1 -0
  39. package/dist/database.js +76 -0
  40. package/dist/database.js.map +1 -0
  41. package/dist/index.d.ts +15 -0
  42. package/dist/index.d.ts.map +1 -0
  43. package/dist/index.js +14 -0
  44. package/dist/index.js.map +1 -0
  45. package/dist/markdown-importer.d.ts +14 -0
  46. package/dist/markdown-importer.d.ts.map +1 -0
  47. package/dist/markdown-importer.js +386 -0
  48. package/dist/markdown-importer.js.map +1 -0
  49. package/dist/reader.d.ts +17 -0
  50. package/dist/reader.d.ts.map +1 -0
  51. package/dist/reader.js +332 -0
  52. package/dist/reader.js.map +1 -0
  53. package/dist/repositories.d.ts +118 -0
  54. package/dist/repositories.d.ts.map +1 -0
  55. package/dist/repositories.js +388 -0
  56. package/dist/repositories.js.map +1 -0
  57. package/dist/service.d.ts +35 -0
  58. package/dist/service.d.ts.map +1 -0
  59. package/dist/service.js +327 -0
  60. package/dist/service.js.map +1 -0
  61. package/dist/types.d.ts +276 -0
  62. package/dist/types.d.ts.map +1 -0
  63. package/dist/types.js +2 -0
  64. package/dist/types.js.map +1 -0
  65. package/dist/validators.d.ts +4 -0
  66. package/dist/validators.d.ts.map +1 -0
  67. package/dist/validators.js +255 -0
  68. package/dist/validators.js.map +1 -0
  69. package/docs/build.md +55 -0
  70. package/docs/configuration.md +34 -0
  71. package/docs/delivery.md +50 -0
  72. package/docs/operations.md +50 -0
  73. package/docs/publishing.md +69 -0
  74. package/docs/schema/generated/README.md +30 -0
  75. package/docs/schema/generated/document_annotations.md +119 -0
  76. package/docs/schema/generated/document_annotations.svg +60 -0
  77. package/docs/schema/generated/document_blocks.md +97 -0
  78. package/docs/schema/generated/document_blocks.svg +60 -0
  79. package/docs/schema/generated/document_change_events.md +135 -0
  80. package/docs/schema/generated/document_change_events.svg +88 -0
  81. package/docs/schema/generated/document_code_groups.md +70 -0
  82. package/docs/schema/generated/document_code_groups.svg +52 -0
  83. package/docs/schema/generated/document_codes.md +88 -0
  84. package/docs/schema/generated/document_codes.svg +52 -0
  85. package/docs/schema/generated/document_contents.md +87 -0
  86. package/docs/schema/generated/document_contents.svg +116 -0
  87. package/docs/schema/generated/document_documents.md +126 -0
  88. package/docs/schema/generated/document_documents.svg +222 -0
  89. package/docs/schema/generated/document_node_taxonomies.md +84 -0
  90. package/docs/schema/generated/document_node_taxonomies.svg +80 -0
  91. package/docs/schema/generated/document_node_taxonomy_levels.md +91 -0
  92. package/docs/schema/generated/document_node_taxonomy_levels.svg +52 -0
  93. package/docs/schema/generated/document_nodes.md +120 -0
  94. package/docs/schema/generated/document_nodes.svg +98 -0
  95. package/docs/schema/generated/document_revisions.md +107 -0
  96. package/docs/schema/generated/document_revisions.svg +116 -0
  97. package/docs/schema/generated/document_versions.md +126 -0
  98. package/docs/schema/generated/document_versions.svg +88 -0
  99. package/docs/schema/generated/schema.json +2534 -0
  100. package/docs/schema/generated/schema.mmd +170 -0
  101. package/docs/schema/generated/schema.svg +331 -0
  102. package/docs/schema/migrations.md +40 -0
  103. package/docs/usage.md +332 -0
  104. package/docs/validation-rules.md +69 -0
  105. package/package.json +30 -0
  106. package/src/database/migrations/0001_document_base.sql +753 -0
@@ -0,0 +1,222 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
3
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <!-- Generated by graphviz version 12.1.2 (20240928.0832)
5
+ -->
6
+ <!-- Title: document_documents Pages: 1 -->
7
+ <svg width="2438pt" height="711pt"
8
+ viewBox="0.00 0.00 2437.55 710.56" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
9
+ <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 706.56)">
10
+ <title>document_documents</title>
11
+ <polygon fill="white" stroke="none" points="-4,4 -4,-706.56 2433.55,-706.56 2433.55,4 -4,4"/>
12
+ <!-- document_documents -->
13
+ <g id="node1" class="node">
14
+ <title>document_documents</title>
15
+ <polygon fill="#efefef" stroke="none" points="1057.26,-349.56 1057.26,-395.56 1398.04,-395.56 1398.04,-349.56 1057.26,-349.56"/>
16
+ <polygon fill="none" stroke="black" points="1057.26,-349.56 1057.26,-395.56 1398.04,-395.56 1398.04,-349.56 1057.26,-349.56"/>
17
+ <text text-anchor="start" x="1114.04" y="-373.36" font-family="Arial Bold" font-size="18.00">document_documents</text>
18
+ <text text-anchor="start" x="1272" y="-373.36" font-family="Arial" font-size="14.00">    </text>
19
+ <text text-anchor="start" x="1303.12" y="-373.36" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
20
+ <text text-anchor="start" x="1067" y="-358.96" font-family="Arial" font-size="14.00" fill="#333333">문서 단위 메타데이터, 작성자, taxonomy, 상태를 관리한다.</text>
21
+ <polygon fill="none" stroke="black" points="1057.26,-318.76 1057.26,-349.56 1398.04,-349.56 1398.04,-318.76 1057.26,-318.76"/>
22
+ <text text-anchor="start" x="1064.26" y="-330.96" font-family="Arial" font-size="14.00">document_id </text>
23
+ <text text-anchor="start" x="1148.31" y="-330.96" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
24
+ <text text-anchor="start" x="1220.65" y="-330.96" font-family="Arial" font-size="14.00"> 문서 식별자</text>
25
+ <polygon fill="none" stroke="black" points="1057.26,-287.96 1057.26,-318.76 1398.04,-318.76 1398.04,-287.96 1057.26,-287.96"/>
26
+ <text text-anchor="start" x="1064.26" y="-300.16" font-family="Arial" font-size="14.00">taxonomy_id </text>
27
+ <text text-anchor="start" x="1147.52" y="-300.16" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
28
+ <text text-anchor="start" x="1219.87" y="-300.16" font-family="Arial" font-size="14.00"> 적용 taxonomy 식별자</text>
29
+ <polygon fill="none" stroke="black" points="1057.26,-257.16 1057.26,-287.96 1398.04,-287.96 1398.04,-257.16 1057.26,-257.16"/>
30
+ <text text-anchor="start" x="1064.26" y="-269.36" font-family="Arial" font-size="14.00">source_document_id </text>
31
+ <text text-anchor="start" x="1198.12" y="-269.36" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
32
+ <text text-anchor="start" x="1270.46" y="-269.36" font-family="Arial" font-size="14.00"> 파생 원본 문서 식별자</text>
33
+ <polygon fill="none" stroke="black" stroke-width="3" points="1055.76,-255.66 1055.76,-397.06 1399.54,-397.06 1399.54,-255.66 1055.76,-255.66"/>
34
+ </g>
35
+ <!-- document_documents&#45;&gt;document_documents -->
36
+ <g id="edge1" class="edge">
37
+ <title>document_documents:source_document_id&#45;&gt;document_documents:document_id</title>
38
+ <path fill="none" stroke="black" d="M1229.98,-297.96C1236.57,-387.72 1235.79,-558.26 1227.65,-558.26 1219.21,-558.26 1218.68,-429.24 1226.07,-349.41"/>
39
+ <polygon fill="black" stroke="black" points="1229.98,-298 1233.67,-287.67 1229.56,-292.68 1229.21,-288.36 1229.21,-288.36 1229.21,-288.36 1229.56,-292.68 1224.7,-288.39 1229.98,-298"/>
40
+ </g>
41
+ <!-- document_node_taxonomies -->
42
+ <g id="node8" class="node">
43
+ <title>document_node_taxonomies</title>
44
+ <polygon fill="#efefef" stroke="none" points="1082.54,-85.76 1082.54,-131.76 1372.75,-131.76 1372.75,-85.76 1082.54,-85.76"/>
45
+ <polygon fill="none" stroke="black" points="1082.54,-85.76 1082.54,-131.76 1372.75,-131.76 1372.75,-85.76 1082.54,-85.76"/>
46
+ <text text-anchor="start" x="1089.54" y="-109.56" font-family="Arial Bold" font-size="18.00">document_node_taxonomies</text>
47
+ <text text-anchor="start" x="1296.5" y="-109.56" font-family="Arial" font-size="14.00">    </text>
48
+ <text text-anchor="start" x="1327.62" y="-109.56" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
49
+ <text text-anchor="start" x="1102.38" y="-95.16" font-family="Arial" font-size="14.00" fill="#333333">문서 유형별 node level 해석 정책을 정의한다.</text>
50
+ <polygon fill="none" stroke="black" points="1082.54,-54.96 1082.54,-85.76 1372.75,-85.76 1372.75,-54.96 1082.54,-54.96"/>
51
+ <text text-anchor="start" x="1089.54" y="-67.16" font-family="Arial" font-size="14.00">taxonomy_id </text>
52
+ <text text-anchor="start" x="1172.81" y="-67.16" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
53
+ <text text-anchor="start" x="1245.16" y="-67.16" font-family="Arial" font-size="14.00"> taxonomy 식별자</text>
54
+ </g>
55
+ <!-- document_documents&#45;&gt;document_node_taxonomies -->
56
+ <g id="edge8" class="edge">
57
+ <title>document_documents:taxonomy_id&#45;&gt;document_node_taxonomies:taxonomy_id</title>
58
+ <path fill="none" stroke="black" d="M1409.35,-302.84C1508.62,-292.5 1491.48,-130.88 1415.95,-54.96 1356.93,4.38 1227.65,29.73 1227.65,-53.96"/>
59
+ <polygon fill="black" stroke="black" points="1409.36,-302.84 1399.15,-298.85 1404.03,-303.11 1399.71,-303.33 1399.71,-303.33 1399.71,-303.33 1404.03,-303.11 1399.6,-307.84 1409.36,-302.84"/>
60
+ </g>
61
+ <!-- document_nodes -->
62
+ <g id="node2" class="node">
63
+ <title>document_nodes</title>
64
+ <polygon fill="#efefef" stroke="none" points="43.2,-613.36 43.2,-659.36 324.1,-659.36 324.1,-613.36 43.2,-613.36"/>
65
+ <polygon fill="none" stroke="black" points="43.2,-613.36 43.2,-659.36 324.1,-659.36 324.1,-613.36 43.2,-613.36"/>
66
+ <text text-anchor="start" x="88.03" y="-637.16" font-family="Arial Bold" font-size="18.00">document_nodes</text>
67
+ <text text-anchor="start" x="210.01" y="-637.16" font-family="Arial" font-size="14.00">    </text>
68
+ <text text-anchor="start" x="241.12" y="-637.16" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
69
+ <text text-anchor="start" x="87.94" y="-622.76" font-family="Arial" font-size="14.00" fill="#333333">문서의 계층 node tree를 관리한다.</text>
70
+ <polygon fill="none" stroke="black" points="43.2,-582.56 43.2,-613.36 324.1,-613.36 324.1,-582.56 43.2,-582.56"/>
71
+ <text text-anchor="start" x="50.2" y="-594.76" font-family="Arial" font-size="14.00">node_id </text>
72
+ <text text-anchor="start" x="103.92" y="-594.76" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
73
+ <text text-anchor="start" x="176.26" y="-594.76" font-family="Arial" font-size="14.00"> 노드 식별자</text>
74
+ <polygon fill="none" stroke="black" points="43.2,-551.76 43.2,-582.56 324.1,-582.56 324.1,-551.76 43.2,-551.76"/>
75
+ <text text-anchor="start" x="50.2" y="-563.96" font-family="Arial" font-size="14.00">document_id </text>
76
+ <text text-anchor="start" x="134.25" y="-563.96" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
77
+ <text text-anchor="start" x="206.6" y="-563.96" font-family="Arial" font-size="14.00"> 소속 문서 식별자</text>
78
+ <polygon fill="none" stroke="black" points="43.2,-520.96 43.2,-551.76 324.1,-551.76 324.1,-520.96 43.2,-520.96"/>
79
+ <text text-anchor="start" x="50.2" y="-533.16" font-family="Arial" font-size="14.00">parent_node_id </text>
80
+ <text text-anchor="start" x="151.4" y="-533.16" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
81
+ <text text-anchor="start" x="223.74" y="-533.16" font-family="Arial" font-size="14.00"> 상위 노드 식별자</text>
82
+ </g>
83
+ <!-- document_nodes&#45;&gt;document_documents -->
84
+ <g id="edge2" class="edge">
85
+ <title>document_nodes:document_id&#45;&gt;document_documents:document_id</title>
86
+ <path fill="none" stroke="black" d="M335.3,-565.84C366.07,-556.69 342.72,-502.39 376.65,-477.76 501.56,-387.07 901.9,-334.16 1056.26,-334.16"/>
87
+ <polygon fill="black" stroke="black" points="335.34,-565.83 324.85,-562.65 330.05,-566.52 325.76,-567.07 325.76,-567.07 325.76,-567.07 330.05,-566.52 326.01,-571.58 335.34,-565.83"/>
88
+ </g>
89
+ <!-- document_contents -->
90
+ <g id="node3" class="node">
91
+ <title>document_contents</title>
92
+ <polygon fill="#efefef" stroke="none" points="428.85,-613.36 428.85,-659.36 770.44,-659.36 770.44,-613.36 428.85,-613.36"/>
93
+ <polygon fill="none" stroke="black" points="428.85,-613.36 428.85,-659.36 770.44,-659.36 770.44,-613.36 428.85,-613.36"/>
94
+ <text text-anchor="start" x="495.04" y="-637.16" font-family="Arial Bold" font-size="18.00">document_contents</text>
95
+ <text text-anchor="start" x="635" y="-637.16" font-family="Arial" font-size="14.00">    </text>
96
+ <text text-anchor="start" x="666.12" y="-637.16" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
97
+ <text text-anchor="start" x="435.85" y="-622.76" font-family="Arial" font-size="14.00" fill="#333333">특정 document node에 붙는 block collection을 관리한다.</text>
98
+ <polygon fill="none" stroke="black" points="428.85,-582.56 428.85,-613.36 770.44,-613.36 770.44,-582.56 428.85,-582.56"/>
99
+ <text text-anchor="start" x="435.85" y="-594.76" font-family="Arial" font-size="14.00">content_id </text>
100
+ <text text-anchor="start" x="504.35" y="-594.76" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
101
+ <text text-anchor="start" x="576.69" y="-594.76" font-family="Arial" font-size="14.00"> content 식별자</text>
102
+ <polygon fill="none" stroke="black" points="428.85,-551.76 428.85,-582.56 770.44,-582.56 770.44,-551.76 428.85,-551.76"/>
103
+ <text text-anchor="start" x="435.85" y="-563.96" font-family="Arial" font-size="14.00">document_id </text>
104
+ <text text-anchor="start" x="519.91" y="-563.96" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
105
+ <text text-anchor="start" x="592.25" y="-563.96" font-family="Arial" font-size="14.00"> 소속 문서 식별자</text>
106
+ <polygon fill="none" stroke="black" points="428.85,-520.96 428.85,-551.76 770.44,-551.76 770.44,-520.96 428.85,-520.96"/>
107
+ <text text-anchor="start" x="435.85" y="-533.16" font-family="Arial" font-size="14.00">node_id </text>
108
+ <text text-anchor="start" x="489.57" y="-533.16" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
109
+ <text text-anchor="start" x="561.91" y="-533.16" font-family="Arial" font-size="14.00"> 소속 노드 식별자</text>
110
+ </g>
111
+ <!-- document_contents&#45;&gt;document_documents -->
112
+ <g id="edge3" class="edge">
113
+ <title>document_contents:document_id&#45;&gt;document_documents:document_id</title>
114
+ <path fill="none" stroke="black" d="M781.73,-565.96C813.12,-557.62 793.52,-507.81 822.65,-477.76 907.48,-390.26 934.38,-334.16 1056.26,-334.16"/>
115
+ <polygon fill="black" stroke="black" points="781.71,-565.96 771.25,-562.65 776.41,-566.58 772.11,-567.08 772.11,-567.08 772.11,-567.08 776.41,-566.58 772.3,-571.59 781.71,-565.96"/>
116
+ </g>
117
+ <!-- document_annotations -->
118
+ <g id="node4" class="node">
119
+ <title>document_annotations</title>
120
+ <polygon fill="#efefef" stroke="none" points="874.4,-597.96 874.4,-643.96 1156.89,-643.96 1156.89,-597.96 874.4,-597.96"/>
121
+ <polygon fill="none" stroke="black" points="874.4,-597.96 874.4,-643.96 1156.89,-643.96 1156.89,-597.96 874.4,-597.96"/>
122
+ <text text-anchor="start" x="899.54" y="-621.76" font-family="Arial Bold" font-size="18.00">document_annotations</text>
123
+ <text text-anchor="start" x="1062.5" y="-621.76" font-family="Arial" font-size="14.00">    </text>
124
+ <text text-anchor="start" x="1093.62" y="-621.76" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
125
+ <text text-anchor="start" x="893.48" y="-607.36" font-family="Arial" font-size="14.00" fill="#333333">문서 본문 밖의 note annotation을 관리한다.</text>
126
+ <polygon fill="none" stroke="black" points="874.4,-567.16 874.4,-597.96 1156.89,-597.96 1156.89,-567.16 874.4,-567.16"/>
127
+ <text text-anchor="start" x="881.4" y="-579.36" font-family="Arial" font-size="14.00">annotation_id </text>
128
+ <text text-anchor="start" x="969.37" y="-579.36" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
129
+ <text text-anchor="start" x="1041.71" y="-579.36" font-family="Arial" font-size="14.00"> annotation 식별자</text>
130
+ <polygon fill="none" stroke="black" points="874.4,-536.36 874.4,-567.16 1156.89,-567.16 1156.89,-536.36 874.4,-536.36"/>
131
+ <text text-anchor="start" x="881.4" y="-548.56" font-family="Arial" font-size="14.00">document_id </text>
132
+ <text text-anchor="start" x="965.46" y="-548.56" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
133
+ <text text-anchor="start" x="1037.8" y="-548.56" font-family="Arial" font-size="14.00"> 소속 문서 식별자</text>
134
+ </g>
135
+ <!-- document_annotations&#45;&gt;document_documents -->
136
+ <g id="edge4" class="edge">
137
+ <title>document_annotations:document_id&#45;&gt;document_documents:document_id</title>
138
+ <path fill="none" stroke="black" d="M1167.71,-549.04C1179.56,-540.18 1168.38,-511.66 1156.89,-493.16 1130.6,-450.83 1083.38,-484.19 1057.26,-441.76 1032.18,-401.04 1008.43,-334.16 1056.26,-334.16"/>
139
+ <polygon fill="black" stroke="black" points="1167.85,-549 1157.01,-547.33 1162.71,-550.42 1158.54,-551.58 1158.54,-551.58 1158.54,-551.58 1162.71,-550.42 1159.42,-556.01 1167.85,-549"/>
140
+ </g>
141
+ <!-- document_revisions -->
142
+ <g id="node5" class="node">
143
+ <title>document_revisions</title>
144
+ <polygon fill="#efefef" stroke="none" points="1261.5,-597.96 1261.5,-643.96 1617.79,-643.96 1617.79,-597.96 1261.5,-597.96"/>
145
+ <polygon fill="none" stroke="black" points="1261.5,-597.96 1261.5,-643.96 1617.79,-643.96 1617.79,-597.96 1261.5,-597.96"/>
146
+ <text text-anchor="start" x="1332.53" y="-621.76" font-family="Arial Bold" font-size="18.00">document_revisions</text>
147
+ <text text-anchor="start" x="1477.51" y="-621.76" font-family="Arial" font-size="14.00">    </text>
148
+ <text text-anchor="start" x="1508.63" y="-621.76" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
149
+ <text text-anchor="start" x="1268.5" y="-607.36" font-family="Arial" font-size="14.00" fill="#333333">하나 이상의 변경 이벤트를 묶는 의미 있는 변경 단위를 관리한다.</text>
150
+ <polygon fill="none" stroke="black" points="1261.5,-567.16 1261.5,-597.96 1617.79,-597.96 1617.79,-567.16 1261.5,-567.16"/>
151
+ <text text-anchor="start" x="1268.5" y="-579.36" font-family="Arial" font-size="14.00">revision_id </text>
152
+ <text text-anchor="start" x="1339.32" y="-579.36" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
153
+ <text text-anchor="start" x="1411.66" y="-579.36" font-family="Arial" font-size="14.00"> revision 식별자</text>
154
+ <polygon fill="none" stroke="black" points="1261.5,-536.36 1261.5,-567.16 1617.79,-567.16 1617.79,-536.36 1261.5,-536.36"/>
155
+ <text text-anchor="start" x="1268.5" y="-548.56" font-family="Arial" font-size="14.00">document_id </text>
156
+ <text text-anchor="start" x="1352.56" y="-548.56" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
157
+ <text text-anchor="start" x="1424.9" y="-548.56" font-family="Arial" font-size="14.00"> 소속 문서 식별자</text>
158
+ </g>
159
+ <!-- document_revisions&#45;&gt;document_documents -->
160
+ <g id="edge5" class="edge">
161
+ <title>document_revisions:document_id&#45;&gt;document_documents:document_id</title>
162
+ <path fill="none" stroke="black" d="M1250.6,-548.98C1238.49,-539.95 1248.96,-510.96 1261.5,-493.16 1298.86,-440.16 1360.89,-494.91 1398.04,-441.76 1425.44,-402.56 1446.86,-334.16 1399.04,-334.16"/>
163
+ <polygon fill="black" stroke="black" points="1250.55,-548.97 1258.97,-556 1255.69,-550.41 1259.86,-551.58 1259.86,-551.58 1259.86,-551.58 1255.69,-550.41 1261.4,-547.34 1250.55,-548.97"/>
164
+ </g>
165
+ <!-- document_change_events -->
166
+ <g id="node6" class="node">
167
+ <title>document_change_events</title>
168
+ <polygon fill="#efefef" stroke="none" points="1722.67,-613.36 1722.67,-659.36 2006.62,-659.36 2006.62,-613.36 1722.67,-613.36"/>
169
+ <polygon fill="none" stroke="black" points="1722.67,-613.36 1722.67,-659.36 2006.62,-659.36 2006.62,-613.36 1722.67,-613.36"/>
170
+ <text text-anchor="start" x="1737.05" y="-637.16" font-family="Arial Bold" font-size="18.00">document_change_events</text>
171
+ <text text-anchor="start" x="1922.99" y="-637.16" font-family="Arial" font-size="14.00">    </text>
172
+ <text text-anchor="start" x="1954.1" y="-637.16" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
173
+ <text text-anchor="start" x="1729.67" y="-622.76" font-family="Arial" font-size="14.00" fill="#333333">revision에 속하는 로그성 변경 이벤트를 관리한다.</text>
174
+ <polygon fill="none" stroke="black" points="1722.67,-582.56 1722.67,-613.36 2006.62,-613.36 2006.62,-582.56 1722.67,-582.56"/>
175
+ <text text-anchor="start" x="1729.67" y="-594.76" font-family="Arial" font-size="14.00">event_id </text>
176
+ <text text-anchor="start" x="1786.49" y="-594.76" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
177
+ <text text-anchor="start" x="1858.84" y="-594.76" font-family="Arial" font-size="14.00"> event 식별자</text>
178
+ <polygon fill="none" stroke="black" points="1722.67,-551.76 1722.67,-582.56 2006.62,-582.56 2006.62,-551.76 1722.67,-551.76"/>
179
+ <text text-anchor="start" x="1729.67" y="-563.96" font-family="Arial" font-size="14.00">revision_id </text>
180
+ <text text-anchor="start" x="1800.49" y="-563.96" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
181
+ <text text-anchor="start" x="1872.83" y="-563.96" font-family="Arial" font-size="14.00"> 소속 revision 식별자</text>
182
+ <polygon fill="none" stroke="black" points="1722.67,-520.96 1722.67,-551.76 2006.62,-551.76 2006.62,-520.96 1722.67,-520.96"/>
183
+ <text text-anchor="start" x="1729.67" y="-533.16" font-family="Arial" font-size="14.00">document_id </text>
184
+ <text text-anchor="start" x="1813.73" y="-533.16" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
185
+ <text text-anchor="start" x="1886.07" y="-533.16" font-family="Arial" font-size="14.00"> 소속 문서 식별자</text>
186
+ </g>
187
+ <!-- document_change_events&#45;&gt;document_documents -->
188
+ <g id="edge6" class="edge">
189
+ <title>document_change_events:document_id&#45;&gt;document_documents:document_id</title>
190
+ <path fill="none" stroke="black" d="M1711.45,-535.01C1688.67,-528.16 1693.92,-496.85 1669.65,-477.76 1562.62,-393.6 1535.2,-334.16 1399.04,-334.16"/>
191
+ <polygon fill="black" stroke="black" points="1711.43,-535.01 1720.75,-540.78 1716.72,-535.7 1721.01,-536.27 1721.01,-536.27 1721.01,-536.27 1716.72,-535.7 1721.93,-531.85 1711.43,-535.01"/>
192
+ </g>
193
+ <!-- document_versions -->
194
+ <g id="node7" class="node">
195
+ <title>document_versions</title>
196
+ <polygon fill="#efefef" stroke="none" points="2110.94,-613.36 2110.94,-659.36 2386.35,-659.36 2386.35,-613.36 2110.94,-613.36"/>
197
+ <polygon fill="none" stroke="black" points="2110.94,-613.36 2110.94,-659.36 2386.35,-659.36 2386.35,-613.36 2110.94,-613.36"/>
198
+ <text text-anchor="start" x="2144.03" y="-637.16" font-family="Arial Bold" font-size="18.00">document_versions</text>
199
+ <text text-anchor="start" x="2284.01" y="-637.16" font-family="Arial" font-size="14.00">    </text>
200
+ <text text-anchor="start" x="2315.12" y="-637.16" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
201
+ <text text-anchor="start" x="2126.89" y="-622.76" font-family="Arial" font-size="14.00" fill="#333333">검토/승인/배포 기준본 snapshot을 관리한다.</text>
202
+ <polygon fill="none" stroke="black" points="2110.94,-582.56 2110.94,-613.36 2386.35,-613.36 2386.35,-582.56 2110.94,-582.56"/>
203
+ <text text-anchor="start" x="2117.94" y="-594.76" font-family="Arial" font-size="14.00">version_id </text>
204
+ <text text-anchor="start" x="2185.64" y="-594.76" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
205
+ <text text-anchor="start" x="2257.99" y="-594.76" font-family="Arial" font-size="14.00"> version 식별자</text>
206
+ <polygon fill="none" stroke="black" points="2110.94,-551.76 2110.94,-582.56 2386.35,-582.56 2386.35,-551.76 2110.94,-551.76"/>
207
+ <text text-anchor="start" x="2117.94" y="-563.96" font-family="Arial" font-size="14.00">document_id </text>
208
+ <text text-anchor="start" x="2202" y="-563.96" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
209
+ <text text-anchor="start" x="2274.34" y="-563.96" font-family="Arial" font-size="14.00"> 소속 문서 식별자</text>
210
+ <polygon fill="none" stroke="black" points="2110.94,-520.96 2110.94,-551.76 2386.35,-551.76 2386.35,-520.96 2110.94,-520.96"/>
211
+ <text text-anchor="start" x="2117.94" y="-533.16" font-family="Arial" font-size="14.00">revision_id </text>
212
+ <text text-anchor="start" x="2188.75" y="-533.16" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
213
+ <text text-anchor="start" x="2261.1" y="-533.16" font-family="Arial" font-size="14.00"> 기준 revision 식별자</text>
214
+ </g>
215
+ <!-- document_versions&#45;&gt;document_documents -->
216
+ <g id="edge7" class="edge">
217
+ <title>document_versions:document_id&#45;&gt;document_documents:document_id</title>
218
+ <path fill="none" stroke="black" d="M2099.75,-565.84C2069.04,-556.71 2092.43,-502.5 2058.65,-477.76 1937.62,-389.12 1549.05,-334.16 1399.04,-334.16"/>
219
+ <polygon fill="black" stroke="black" points="2099.69,-565.83 2109.03,-571.58 2104.98,-566.52 2109.28,-567.07 2109.28,-567.07 2109.28,-567.07 2104.98,-566.52 2110.19,-562.65 2099.69,-565.83"/>
220
+ </g>
221
+ </g>
222
+ </svg>
@@ -0,0 +1,84 @@
1
+ # document_node_taxonomies
2
+
3
+ ## Description
4
+
5
+ 문서 유형별 node level 해석 정책을 정의한다.
6
+
7
+ <details>
8
+ <summary><strong>Table Definition</strong></summary>
9
+
10
+ ```sql
11
+ CREATE TABLE document_node_taxonomies (
12
+ -- taxonomy 식별자
13
+ taxonomy_id CHAR(36) PRIMARY KEY
14
+ CHECK (length(taxonomy_id) = 36),
15
+
16
+ -- taxonomy 코드
17
+ taxonomy_code VARCHAR(128) NOT NULL UNIQUE,
18
+
19
+ -- taxonomy 이름
20
+ taxonomy_name VARCHAR(128) NOT NULL,
21
+
22
+ -- 문서 유형 코드
23
+ document_type_code VARCHAR(128) NOT NULL,
24
+
25
+ -- 기본 TOC 포함 level
26
+ default_toc_level_limit INTEGER NOT NULL DEFAULT 3
27
+ CHECK (default_toc_level_limit >= 1),
28
+
29
+ -- 설명
30
+ description TEXT,
31
+
32
+ -- 활성 여부
33
+ is_active INTEGER NOT NULL DEFAULT 1
34
+ CHECK (is_active IN (0, 1)),
35
+
36
+ -- 생성 시각
37
+ created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
38
+
39
+ -- 수정 시각
40
+ updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
41
+ )
42
+ ```
43
+
44
+ </details>
45
+
46
+ ## Columns
47
+
48
+ | Name | Type | Default | Nullable | Children | Comment |
49
+ | ----------------------- | ------------ | ----------------- | -------- | ------------------------------------------------------------------------------------------------------------- | ------------------- |
50
+ | taxonomy_id | CHAR(36) | | true | [document_node_taxonomy_levels](document_node_taxonomy_levels.md) [document_documents](document_documents.md) | taxonomy 식별자 |
51
+ | taxonomy_code | VARCHAR(128) | | false | | taxonomy 코드 |
52
+ | taxonomy_name | VARCHAR(128) | | false | | taxonomy 이름 |
53
+ | document_type_code | VARCHAR(128) | | false | | 문서 유형 코드 |
54
+ | default_toc_level_limit | INTEGER | 3 | false | | 기본 TOC 포함 level |
55
+ | description | TEXT | | true | | 설명 |
56
+ | is_active | INTEGER | 1 | false | | 활성 여부 |
57
+ | created_at | DATETIME | CURRENT_TIMESTAMP | false | | 생성 시각 |
58
+ | updated_at | DATETIME | CURRENT_TIMESTAMP | false | | 수정 시각 |
59
+
60
+ ## Constraints
61
+
62
+ | Name | Type | Definition |
63
+ | ------------------------------------------- | ----------- | ------------------------------------ |
64
+ | taxonomy_id | PRIMARY KEY | PRIMARY KEY (taxonomy_id) |
65
+ | sqlite_autoindex_document_node_taxonomies_2 | UNIQUE | UNIQUE (taxonomy_code) |
66
+ | sqlite_autoindex_document_node_taxonomies_1 | PRIMARY KEY | PRIMARY KEY (taxonomy_id) |
67
+ | - | CHECK | CHECK (length(taxonomy_id) = 36) |
68
+ | - | CHECK | CHECK (default_toc_level_limit >= 1) |
69
+ | - | CHECK | CHECK (is_active IN (0, 1)) |
70
+
71
+ ## Indexes
72
+
73
+ | Name | Definition |
74
+ | ------------------------------------------- | ------------------------- |
75
+ | sqlite_autoindex_document_node_taxonomies_2 | UNIQUE (taxonomy_code) |
76
+ | sqlite_autoindex_document_node_taxonomies_1 | PRIMARY KEY (taxonomy_id) |
77
+
78
+ ## Relations
79
+
80
+ ![er](document_node_taxonomies.svg)
81
+
82
+ ---
83
+
84
+ > Generated by [tbls](https://github.com/k1LoW/tbls)
@@ -0,0 +1,80 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
3
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <!-- Generated by graphviz version 12.1.2 (20240928.0832)
5
+ -->
6
+ <!-- Title: document_node_taxonomies Pages: 1 -->
7
+ <svg width="942pt" height="438pt"
8
+ viewBox="0.00 0.00 941.54 438.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
9
+ <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 434)">
10
+ <title>document_node_taxonomies</title>
11
+ <polygon fill="white" stroke="none" points="-4,4 -4,-434 937.54,-434 937.54,4 -4,4"/>
12
+ <!-- document_node_taxonomies -->
13
+ <g id="node1" class="node">
14
+ <title>document_node_taxonomies</title>
15
+ <polygon fill="#efefef" stroke="none" points="336.85,-77 336.85,-123 627.06,-123 627.06,-77 336.85,-77"/>
16
+ <polygon fill="none" stroke="black" points="336.85,-77 336.85,-123 627.06,-123 627.06,-77 336.85,-77"/>
17
+ <text text-anchor="start" x="343.85" y="-100.8" font-family="Arial Bold" font-size="18.00">document_node_taxonomies</text>
18
+ <text text-anchor="start" x="550.8" y="-100.8" font-family="Arial" font-size="14.00">    </text>
19
+ <text text-anchor="start" x="581.92" y="-100.8" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
20
+ <text text-anchor="start" x="356.69" y="-86.4" font-family="Arial" font-size="14.00" fill="#333333">문서 유형별 node level 해석 정책을 정의한다.</text>
21
+ <polygon fill="none" stroke="black" points="336.85,-46.2 336.85,-77 627.06,-77 627.06,-46.2 336.85,-46.2"/>
22
+ <text text-anchor="start" x="343.85" y="-58.4" font-family="Arial" font-size="14.00">taxonomy_id </text>
23
+ <text text-anchor="start" x="427.11" y="-58.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
24
+ <text text-anchor="start" x="499.46" y="-58.4" font-family="Arial" font-size="14.00"> taxonomy 식별자</text>
25
+ <polygon fill="none" stroke="black" stroke-width="3" points="335.35,-44.7 335.35,-124.5 628.56,-124.5 628.56,-44.7 335.35,-44.7"/>
26
+ </g>
27
+ <!-- document_node_taxonomy_levels -->
28
+ <g id="node2" class="node">
29
+ <title>document_node_taxonomy_levels</title>
30
+ <polygon fill="#efefef" stroke="none" points="43.2,-325.4 43.2,-371.4 444.7,-371.4 444.7,-325.4 43.2,-325.4"/>
31
+ <polygon fill="none" stroke="black" points="43.2,-325.4 43.2,-371.4 444.7,-371.4 444.7,-325.4 43.2,-325.4"/>
32
+ <text text-anchor="start" x="85.85" y="-349.2" font-family="Arial Bold" font-size="18.00">document_node_taxonomy_levels</text>
33
+ <text text-anchor="start" x="332.8" y="-349.2" font-family="Arial" font-size="14.00">    </text>
34
+ <text text-anchor="start" x="363.91" y="-349.2" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
35
+ <text text-anchor="start" x="50.2" y="-334.8" font-family="Arial" font-size="14.00" fill="#333333">taxonomy별 node level 라벨, 번호 정책, counter scope를 정의한다.</text>
36
+ <polygon fill="none" stroke="black" points="43.2,-294.6 43.2,-325.4 444.7,-325.4 444.7,-294.6 43.2,-294.6"/>
37
+ <text text-anchor="start" x="50.2" y="-306.8" font-family="Arial" font-size="14.00">taxonomy_level_id </text>
38
+ <text text-anchor="start" x="170.05" y="-306.8" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
39
+ <text text-anchor="start" x="242.39" y="-306.8" font-family="Arial" font-size="14.00"> taxonomy level 식별자</text>
40
+ <polygon fill="none" stroke="black" points="43.2,-263.8 43.2,-294.6 444.7,-294.6 444.7,-263.8 43.2,-263.8"/>
41
+ <text text-anchor="start" x="50.2" y="-276" font-family="Arial" font-size="14.00">taxonomy_id </text>
42
+ <text text-anchor="start" x="133.47" y="-276" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
43
+ <text text-anchor="start" x="205.81" y="-276" font-family="Arial" font-size="14.00"> taxonomy 식별자</text>
44
+ </g>
45
+ <!-- document_node_taxonomy_levels&#45;&gt;document_node_taxonomies -->
46
+ <g id="edge1" class="edge">
47
+ <title>document_node_taxonomy_levels:taxonomy_id&#45;&gt;document_node_taxonomies:taxonomy_id</title>
48
+ <path fill="none" stroke="black" d="M455.54,-276.46C467.47,-267.56 456.48,-238.91 444.7,-220.6 415.98,-175.94 365.4,-213.97 336.85,-169.2 311.13,-128.88 288.02,-61.6 335.85,-61.6"/>
49
+ <polygon fill="black" stroke="black" points="455.66,-276.43 444.82,-274.77 450.52,-277.86 446.35,-279.02 446.35,-279.02 446.35,-279.02 450.52,-277.86 447.23,-283.45 455.66,-276.43"/>
50
+ </g>
51
+ <!-- document_documents -->
52
+ <g id="node3" class="node">
53
+ <title>document_documents</title>
54
+ <polygon fill="#efefef" stroke="none" points="549.56,-340.8 549.56,-386.8 890.34,-386.8 890.34,-340.8 549.56,-340.8"/>
55
+ <polygon fill="none" stroke="black" points="549.56,-340.8 549.56,-386.8 890.34,-386.8 890.34,-340.8 549.56,-340.8"/>
56
+ <text text-anchor="start" x="606.34" y="-364.6" font-family="Arial Bold" font-size="18.00">document_documents</text>
57
+ <text text-anchor="start" x="764.31" y="-364.6" font-family="Arial" font-size="14.00">    </text>
58
+ <text text-anchor="start" x="795.42" y="-364.6" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
59
+ <text text-anchor="start" x="559.3" y="-350.2" font-family="Arial" font-size="14.00" fill="#333333">문서 단위 메타데이터, 작성자, taxonomy, 상태를 관리한다.</text>
60
+ <polygon fill="none" stroke="black" points="549.56,-310 549.56,-340.8 890.34,-340.8 890.34,-310 549.56,-310"/>
61
+ <text text-anchor="start" x="556.56" y="-322.2" font-family="Arial" font-size="14.00">document_id </text>
62
+ <text text-anchor="start" x="640.61" y="-322.2" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
63
+ <text text-anchor="start" x="712.96" y="-322.2" font-family="Arial" font-size="14.00"> 문서 식별자</text>
64
+ <polygon fill="none" stroke="black" points="549.56,-279.2 549.56,-310 890.34,-310 890.34,-279.2 549.56,-279.2"/>
65
+ <text text-anchor="start" x="556.56" y="-291.4" font-family="Arial" font-size="14.00">taxonomy_id </text>
66
+ <text text-anchor="start" x="639.83" y="-291.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
67
+ <text text-anchor="start" x="712.17" y="-291.4" font-family="Arial" font-size="14.00"> 적용 taxonomy 식별자</text>
68
+ <polygon fill="none" stroke="black" points="549.56,-248.4 549.56,-279.2 890.34,-279.2 890.34,-248.4 549.56,-248.4"/>
69
+ <text text-anchor="start" x="556.56" y="-260.6" font-family="Arial" font-size="14.00">source_document_id </text>
70
+ <text text-anchor="start" x="690.42" y="-260.6" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
71
+ <text text-anchor="start" x="762.76" y="-260.6" font-family="Arial" font-size="14.00"> 파생 원본 문서 식별자</text>
72
+ </g>
73
+ <!-- document_documents&#45;&gt;document_node_taxonomies -->
74
+ <g id="edge2" class="edge">
75
+ <title>document_documents:taxonomy_id&#45;&gt;document_node_taxonomies:taxonomy_id</title>
76
+ <path fill="none" stroke="black" d="M538.55,-293.07C512.59,-283.87 530.1,-235.32 549.56,-205.2 570.17,-173.3 606.48,-201.12 627.06,-169.2 652.97,-129 675.88,-61.6 628.06,-61.6"/>
77
+ <polygon fill="black" stroke="black" points="538.34,-293.04 547.55,-299 543.62,-293.84 547.9,-294.5 547.9,-294.5 547.9,-294.5 543.62,-293.84 548.91,-290.1 538.34,-293.04"/>
78
+ </g>
79
+ </g>
80
+ </svg>
@@ -0,0 +1,91 @@
1
+ # document_node_taxonomy_levels
2
+
3
+ ## Description
4
+
5
+ taxonomy별 node level 라벨, 번호 정책, counter scope를 정의한다.
6
+
7
+ <details>
8
+ <summary><strong>Table Definition</strong></summary>
9
+
10
+ ```sql
11
+ CREATE TABLE document_node_taxonomy_levels (
12
+ -- taxonomy level 식별자
13
+ taxonomy_level_id CHAR(36) PRIMARY KEY
14
+ CHECK (length(taxonomy_level_id) = 36),
15
+
16
+ -- taxonomy 식별자
17
+ taxonomy_id CHAR(36) NOT NULL
18
+ CHECK (length(taxonomy_id) = 36),
19
+
20
+ -- node level
21
+ node_level INTEGER NOT NULL
22
+ CHECK (node_level >= 1),
23
+
24
+ -- node label 코드
25
+ node_label_code VARCHAR(128) NOT NULL,
26
+
27
+ -- 번호 정책 코드
28
+ numbering_policy_code VARCHAR(64) NOT NULL,
29
+
30
+ -- 번호 카운터 범위 코드
31
+ counter_scope_code VARCHAR(64) NOT NULL,
32
+
33
+ -- 표시 정렬 순서
34
+ sort_order INTEGER NOT NULL DEFAULT 0,
35
+
36
+ -- 생성 시각
37
+ created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
38
+
39
+ -- 수정 시각
40
+ updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
41
+
42
+ FOREIGN KEY (taxonomy_id)
43
+ REFERENCES document_node_taxonomies (taxonomy_id)
44
+ ON DELETE CASCADE,
45
+
46
+ UNIQUE (taxonomy_id, node_level)
47
+ )
48
+ ```
49
+
50
+ </details>
51
+
52
+ ## Columns
53
+
54
+ | Name | Type | Default | Nullable | Parents | Comment |
55
+ | --------------------- | ------------ | ----------------- | -------- | ------------------------------------------------------- | --------------------- |
56
+ | taxonomy_level_id | CHAR(36) | | true | | taxonomy level 식별자 |
57
+ | taxonomy_id | CHAR(36) | | false | [document_node_taxonomies](document_node_taxonomies.md) | taxonomy 식별자 |
58
+ | node_level | INTEGER | | false | | node level |
59
+ | node_label_code | VARCHAR(128) | | false | | node label 코드 |
60
+ | numbering_policy_code | VARCHAR(64) | | false | | 번호 정책 코드 |
61
+ | counter_scope_code | VARCHAR(64) | | false | | 번호 카운터 범위 코드 |
62
+ | sort_order | INTEGER | 0 | false | | 표시 정렬 순서 |
63
+ | created_at | DATETIME | CURRENT_TIMESTAMP | false | | 생성 시각 |
64
+ | updated_at | DATETIME | CURRENT_TIMESTAMP | false | | 수정 시각 |
65
+
66
+ ## Constraints
67
+
68
+ | Name | Type | Definition |
69
+ | ------------------------------------------------ | ----------- | ---------------------------------------------------------------------------------------------------------------------------- |
70
+ | taxonomy_level_id | PRIMARY KEY | PRIMARY KEY (taxonomy_level_id) |
71
+ | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (taxonomy_id) REFERENCES document_node_taxonomies (taxonomy_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
72
+ | sqlite_autoindex_document_node_taxonomy_levels_2 | UNIQUE | UNIQUE (taxonomy_id, node_level) |
73
+ | sqlite_autoindex_document_node_taxonomy_levels_1 | PRIMARY KEY | PRIMARY KEY (taxonomy_level_id) |
74
+ | - | CHECK | CHECK (length(taxonomy_level_id) = 36) |
75
+ | - | CHECK | CHECK (length(taxonomy_id) = 36) |
76
+ | - | CHECK | CHECK (node_level >= 1) |
77
+
78
+ ## Indexes
79
+
80
+ | Name | Definition |
81
+ | ------------------------------------------------ | -------------------------------- |
82
+ | sqlite_autoindex_document_node_taxonomy_levels_2 | UNIQUE (taxonomy_id, node_level) |
83
+ | sqlite_autoindex_document_node_taxonomy_levels_1 | PRIMARY KEY (taxonomy_level_id) |
84
+
85
+ ## Relations
86
+
87
+ ![er](document_node_taxonomy_levels.svg)
88
+
89
+ ---
90
+
91
+ > Generated by [tbls](https://github.com/k1LoW/tbls)
@@ -0,0 +1,52 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
3
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <!-- Generated by graphviz version 12.1.2 (20240928.0832)
5
+ -->
6
+ <!-- Title: document_node_taxonomy_levels Pages: 1 -->
7
+ <svg width="502pt" height="419pt"
8
+ viewBox="0.00 0.00 501.90 418.96" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
9
+ <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 414.96)">
10
+ <title>document_node_taxonomy_levels</title>
11
+ <polygon fill="white" stroke="none" points="-4,4 -4,-414.96 497.9,-414.96 497.9,4 -4,4"/>
12
+ <!-- document_node_taxonomy_levels -->
13
+ <g id="node1" class="node">
14
+ <title>document_node_taxonomy_levels</title>
15
+ <polygon fill="#efefef" stroke="none" points="46.2,-318.76 46.2,-364.76 447.7,-364.76 447.7,-318.76 46.2,-318.76"/>
16
+ <polygon fill="none" stroke="black" points="46.2,-318.76 46.2,-364.76 447.7,-364.76 447.7,-318.76 46.2,-318.76"/>
17
+ <text text-anchor="start" x="88.85" y="-342.56" font-family="Arial Bold" font-size="18.00">document_node_taxonomy_levels</text>
18
+ <text text-anchor="start" x="335.8" y="-342.56" font-family="Arial" font-size="14.00">    </text>
19
+ <text text-anchor="start" x="366.91" y="-342.56" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
20
+ <text text-anchor="start" x="53.2" y="-328.16" font-family="Arial" font-size="14.00" fill="#333333">taxonomy별 node level 라벨, 번호 정책, counter scope를 정의한다.</text>
21
+ <polygon fill="none" stroke="black" points="46.2,-287.96 46.2,-318.76 447.7,-318.76 447.7,-287.96 46.2,-287.96"/>
22
+ <text text-anchor="start" x="53.2" y="-300.16" font-family="Arial" font-size="14.00">taxonomy_level_id </text>
23
+ <text text-anchor="start" x="173.05" y="-300.16" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
24
+ <text text-anchor="start" x="245.39" y="-300.16" font-family="Arial" font-size="14.00"> taxonomy level 식별자</text>
25
+ <polygon fill="none" stroke="black" points="46.2,-257.16 46.2,-287.96 447.7,-287.96 447.7,-257.16 46.2,-257.16"/>
26
+ <text text-anchor="start" x="53.2" y="-269.36" font-family="Arial" font-size="14.00">taxonomy_id </text>
27
+ <text text-anchor="start" x="136.47" y="-269.36" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
28
+ <text text-anchor="start" x="208.81" y="-269.36" font-family="Arial" font-size="14.00"> taxonomy 식별자</text>
29
+ <polygon fill="none" stroke="black" stroke-width="3" points="44.7,-255.66 44.7,-366.26 449.2,-366.26 449.2,-255.66 44.7,-255.66"/>
30
+ </g>
31
+ <!-- document_node_taxonomies -->
32
+ <g id="node2" class="node">
33
+ <title>document_node_taxonomies</title>
34
+ <polygon fill="#efefef" stroke="none" points="101.85,-85.76 101.85,-131.76 392.06,-131.76 392.06,-85.76 101.85,-85.76"/>
35
+ <polygon fill="none" stroke="black" points="101.85,-85.76 101.85,-131.76 392.06,-131.76 392.06,-85.76 101.85,-85.76"/>
36
+ <text text-anchor="start" x="108.85" y="-109.56" font-family="Arial Bold" font-size="18.00">document_node_taxonomies</text>
37
+ <text text-anchor="start" x="315.8" y="-109.56" font-family="Arial" font-size="14.00">    </text>
38
+ <text text-anchor="start" x="346.92" y="-109.56" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
39
+ <text text-anchor="start" x="121.69" y="-95.16" font-family="Arial" font-size="14.00" fill="#333333">문서 유형별 node level 해석 정책을 정의한다.</text>
40
+ <polygon fill="none" stroke="black" points="101.85,-54.96 101.85,-85.76 392.06,-85.76 392.06,-54.96 101.85,-54.96"/>
41
+ <text text-anchor="start" x="108.85" y="-67.16" font-family="Arial" font-size="14.00">taxonomy_id </text>
42
+ <text text-anchor="start" x="192.11" y="-67.16" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
43
+ <text text-anchor="start" x="264.46" y="-67.16" font-family="Arial" font-size="14.00"> taxonomy 식별자</text>
44
+ </g>
45
+ <!-- document_node_taxonomy_levels&#45;&gt;document_node_taxonomies -->
46
+ <g id="edge1" class="edge">
47
+ <title>document_node_taxonomy_levels:taxonomy_id&#45;&gt;document_node_taxonomies:taxonomy_id</title>
48
+ <path fill="none" stroke="black" d="M247.63,-245.82C258.14,-171.81 387.22,-247.98 435.26,-174.96 464.57,-130.4 472.87,-92.77 435.26,-54.96 376.23,4.38 246.95,29.73 246.95,-53.96"/>
49
+ <polygon fill="black" stroke="black" points="247.63,-245.85 242.48,-255.53 247.28,-251.17 246.99,-255.49 246.99,-255.49 246.99,-255.49 247.28,-251.17 251.46,-256.12 247.63,-245.85"/>
50
+ </g>
51
+ </g>
52
+ </svg>