@soddong/agentic-domain-artifact-standard 0.11.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.
- package/.tbls.yml +54 -0
- package/CHANGELOG.md +94 -0
- package/README.md +386 -0
- package/dist/database.d.ts +8 -0
- package/dist/database.d.ts.map +1 -0
- package/dist/database.js +76 -0
- package/dist/database.js.map +1 -0
- package/dist/fixtures.d.ts +11 -0
- package/dist/fixtures.d.ts.map +1 -0
- package/dist/fixtures.js +537 -0
- package/dist/fixtures.js.map +1 -0
- package/dist/index.d.ts +72 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +213 -0
- package/dist/index.js.map +1 -0
- package/dist/repositories.d.ts +46 -0
- package/dist/repositories.d.ts.map +1 -0
- package/dist/repositories.js +730 -0
- package/dist/repositories.js.map +1 -0
- package/dist/seed-apply.d.ts +20 -0
- package/dist/seed-apply.d.ts.map +1 -0
- package/dist/seed-apply.js +198 -0
- package/dist/seed-apply.js.map +1 -0
- package/dist/service.d.ts +40 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +105 -0
- package/dist/service.js.map +1 -0
- package/dist/types.d.ts +499 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/docs/build.md +27 -0
- package/docs/configuration.md +5 -0
- package/docs/delivery.md +26 -0
- package/docs/operations.md +28 -0
- package/docs/publishing.md +43 -0
- package/docs/schema/generated/README.md +38 -0
- package/docs/schema/generated/artifact_standard_blueprint_nodes.md +137 -0
- package/docs/schema/generated/artifact_standard_blueprint_nodes.svg +88 -0
- package/docs/schema/generated/artifact_standard_code_groups.md +70 -0
- package/docs/schema/generated/artifact_standard_code_groups.svg +49 -0
- package/docs/schema/generated/artifact_standard_codes.md +88 -0
- package/docs/schema/generated/artifact_standard_codes.svg +49 -0
- package/docs/schema/generated/artifact_standard_component_bindings.md +118 -0
- package/docs/schema/generated/artifact_standard_component_bindings.svg +73 -0
- package/docs/schema/generated/artifact_standard_components.md +114 -0
- package/docs/schema/generated/artifact_standard_components.svg +73 -0
- package/docs/schema/generated/artifact_standard_diagram_policies.md +99 -0
- package/docs/schema/generated/artifact_standard_diagram_policies.svg +49 -0
- package/docs/schema/generated/artifact_standard_document_blueprints.md +101 -0
- package/docs/schema/generated/artifact_standard_document_blueprints.svg +128 -0
- package/docs/schema/generated/artifact_standard_document_component_relations.md +118 -0
- package/docs/schema/generated/artifact_standard_document_component_relations.svg +87 -0
- package/docs/schema/generated/artifact_standard_document_components.md +148 -0
- package/docs/schema/generated/artifact_standard_document_components.svg +139 -0
- package/docs/schema/generated/artifact_standard_figure_policies.md +99 -0
- package/docs/schema/generated/artifact_standard_figure_policies.svg +49 -0
- package/docs/schema/generated/artifact_standard_generated_output_links.md +144 -0
- package/docs/schema/generated/artifact_standard_generated_output_links.svg +57 -0
- package/docs/schema/generated/artifact_standard_physical_structure_policies.md +124 -0
- package/docs/schema/generated/artifact_standard_physical_structure_policies.svg +78 -0
- package/docs/schema/generated/artifact_standard_schema_migrations.md +52 -0
- package/docs/schema/generated/artifact_standard_schema_migrations.svg +27 -0
- package/docs/schema/generated/artifact_standard_source_mappings.md +120 -0
- package/docs/schema/generated/artifact_standard_source_mappings.svg +49 -0
- package/docs/schema/generated/artifact_standard_standards.md +102 -0
- package/docs/schema/generated/artifact_standard_standards.svg +313 -0
- package/docs/schema/generated/artifact_standard_table_column_schemas.md +147 -0
- package/docs/schema/generated/artifact_standard_table_column_schemas.svg +52 -0
- package/docs/schema/generated/artifact_standard_table_schemas.md +99 -0
- package/docs/schema/generated/artifact_standard_table_schemas.svg +71 -0
- package/docs/schema/generated/artifact_standard_template_slots.md +143 -0
- package/docs/schema/generated/artifact_standard_template_slots.svg +88 -0
- package/docs/schema/generated/artifact_standard_validation_rule_set_rules.md +128 -0
- package/docs/schema/generated/artifact_standard_validation_rule_set_rules.svg +52 -0
- package/docs/schema/generated/artifact_standard_validation_rule_sets.md +91 -0
- package/docs/schema/generated/artifact_standard_validation_rule_sets.svg +71 -0
- package/docs/schema/generated/schema.json +4230 -0
- package/docs/schema/generated/schema.mmd +327 -0
- package/docs/schema/generated/schema.svg +510 -0
- package/docs/usage.md +197 -0
- package/package.json +30 -0
- package/src/database/migrations/0001_artifact_standard_base.sql +1295 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# artifact_standard_document_blueprints
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
산출물 문서 구조 기준을 관리한다.
|
|
6
|
+
|
|
7
|
+
<details>
|
|
8
|
+
<summary><strong>Table Definition</strong></summary>
|
|
9
|
+
|
|
10
|
+
```sql
|
|
11
|
+
CREATE TABLE artifact_standard_document_blueprints (
|
|
12
|
+
-- blueprint 식별자
|
|
13
|
+
blueprint_id CHAR(36) PRIMARY KEY
|
|
14
|
+
CHECK (length(blueprint_id) = 36),
|
|
15
|
+
|
|
16
|
+
-- 소속 산출물 표준 식별자
|
|
17
|
+
artifact_standard_id CHAR(36) NOT NULL
|
|
18
|
+
CHECK (length(artifact_standard_id) = 36),
|
|
19
|
+
|
|
20
|
+
-- blueprint 코드
|
|
21
|
+
blueprint_code VARCHAR(128) NOT NULL,
|
|
22
|
+
|
|
23
|
+
-- blueprint 이름
|
|
24
|
+
blueprint_name VARCHAR(256) NOT NULL,
|
|
25
|
+
|
|
26
|
+
-- 문서 유형 코드
|
|
27
|
+
document_type_code VARCHAR(128) NOT NULL,
|
|
28
|
+
|
|
29
|
+
-- document taxonomy 코드
|
|
30
|
+
taxonomy_code VARCHAR(128),
|
|
31
|
+
|
|
32
|
+
-- 기본 TOC level limit
|
|
33
|
+
default_toc_level_limit INTEGER NOT NULL DEFAULT 3
|
|
34
|
+
CHECK (default_toc_level_limit >= 1),
|
|
35
|
+
|
|
36
|
+
-- 설명
|
|
37
|
+
description TEXT,
|
|
38
|
+
|
|
39
|
+
-- 생성 시각
|
|
40
|
+
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
41
|
+
|
|
42
|
+
-- 수정 시각
|
|
43
|
+
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
44
|
+
|
|
45
|
+
-- 확장 메타데이터
|
|
46
|
+
metadata_json JSON
|
|
47
|
+
CHECK (metadata_json IS NULL OR json_valid(metadata_json)),
|
|
48
|
+
|
|
49
|
+
FOREIGN KEY (artifact_standard_id)
|
|
50
|
+
REFERENCES artifact_standard_standards (artifact_standard_id)
|
|
51
|
+
ON DELETE CASCADE,
|
|
52
|
+
|
|
53
|
+
UNIQUE (artifact_standard_id, blueprint_code)
|
|
54
|
+
)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
</details>
|
|
58
|
+
|
|
59
|
+
## Columns
|
|
60
|
+
|
|
61
|
+
| Name | Type | Default | Nullable | Children | Parents |
|
|
62
|
+
| ----------------------- | ------------ | ----------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
|
|
63
|
+
| blueprint_id | CHAR(36) | | true | [artifact_standard_blueprint_nodes](artifact_standard_blueprint_nodes.md) [artifact_standard_template_slots](artifact_standard_template_slots.md) [artifact_standard_document_components](artifact_standard_document_components.md) | |
|
|
64
|
+
| artifact_standard_id | CHAR(36) | | false | | [artifact_standard_standards](artifact_standard_standards.md) |
|
|
65
|
+
| blueprint_code | VARCHAR(128) | | false | | |
|
|
66
|
+
| blueprint_name | VARCHAR(256) | | false | | |
|
|
67
|
+
| document_type_code | VARCHAR(128) | | false | | |
|
|
68
|
+
| taxonomy_code | VARCHAR(128) | | true | | |
|
|
69
|
+
| default_toc_level_limit | INTEGER | 3 | false | | |
|
|
70
|
+
| description | TEXT | | true | | |
|
|
71
|
+
| created_at | DATETIME | CURRENT_TIMESTAMP | false | | |
|
|
72
|
+
| updated_at | DATETIME | CURRENT_TIMESTAMP | false | | |
|
|
73
|
+
| metadata_json | JSON | | true | | |
|
|
74
|
+
|
|
75
|
+
## Constraints
|
|
76
|
+
|
|
77
|
+
| Name | Type | Definition |
|
|
78
|
+
| -------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
79
|
+
| blueprint_id | PRIMARY KEY | PRIMARY KEY (blueprint_id) |
|
|
80
|
+
| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
|
|
81
|
+
| sqlite_autoindex_artifact_standard_document_blueprints_2 | UNIQUE | UNIQUE (artifact_standard_id, blueprint_code) |
|
|
82
|
+
| sqlite_autoindex_artifact_standard_document_blueprints_1 | PRIMARY KEY | PRIMARY KEY (blueprint_id) |
|
|
83
|
+
| - | CHECK | CHECK (length(blueprint_id) = 36) |
|
|
84
|
+
| - | CHECK | CHECK (length(artifact_standard_id) = 36) |
|
|
85
|
+
| - | CHECK | CHECK (default_toc_level_limit >= 1) |
|
|
86
|
+
| - | CHECK | CHECK (metadata_json IS NULL OR json_valid(metadata_json)) |
|
|
87
|
+
|
|
88
|
+
## Indexes
|
|
89
|
+
|
|
90
|
+
| Name | Definition |
|
|
91
|
+
| -------------------------------------------------------- | --------------------------------------------- |
|
|
92
|
+
| sqlite_autoindex_artifact_standard_document_blueprints_2 | UNIQUE (artifact_standard_id, blueprint_code) |
|
|
93
|
+
| sqlite_autoindex_artifact_standard_document_blueprints_1 | PRIMARY KEY (blueprint_id) |
|
|
94
|
+
|
|
95
|
+
## Relations
|
|
96
|
+
|
|
97
|
+

|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
|
@@ -0,0 +1,128 @@
|
|
|
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: artifact_standard_document_blueprints Pages: 1 -->
|
|
7
|
+
<svg width="1441pt" height="714pt"
|
|
8
|
+
viewBox="0.00 0.00 1441.07 714.49" 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 710.49)">
|
|
10
|
+
<title>artifact_standard_document_blueprints</title>
|
|
11
|
+
<polygon fill="white" stroke="none" points="-4,4 -4,-710.49 1437.07,-710.49 1437.07,4 -4,4"/>
|
|
12
|
+
<!-- artifact_standard_document_blueprints -->
|
|
13
|
+
<g id="node1" class="node">
|
|
14
|
+
<title>artifact_standard_document_blueprints</title>
|
|
15
|
+
<polygon fill="#efefef" stroke="none" points="508.2,-322.69 508.2,-368.69 873.37,-368.69 873.37,-322.69 508.2,-322.69"/>
|
|
16
|
+
<polygon fill="none" stroke="black" points="508.2,-322.69 508.2,-368.69 873.37,-368.69 873.37,-322.69 508.2,-322.69"/>
|
|
17
|
+
<text text-anchor="start" x="515.2" y="-346.49" font-family="Arial Bold" font-size="18.00">artifact_standard_document_blueprints</text>
|
|
18
|
+
<text text-anchor="start" x="797.11" y="-346.49" font-family="Arial" font-size="14.00"> </text>
|
|
19
|
+
<text text-anchor="start" x="828.23" y="-346.49" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
|
|
20
|
+
<text text-anchor="start" x="599.38" y="-332.09" font-family="Arial" font-size="14.00" fill="#333333">산출물 문서 구조 기준을 관리한다.</text>
|
|
21
|
+
<polygon fill="none" stroke="black" points="508.2,-291.89 508.2,-322.69 873.37,-322.69 873.37,-291.89 508.2,-291.89"/>
|
|
22
|
+
<text text-anchor="start" x="515.2" y="-304.09" font-family="Arial" font-size="14.00">blueprint_id </text>
|
|
23
|
+
<text text-anchor="start" x="591.48" y="-304.09" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
24
|
+
<polygon fill="none" stroke="black" points="508.2,-261.09 508.2,-291.89 873.37,-291.89 873.37,-261.09 508.2,-261.09"/>
|
|
25
|
+
<text text-anchor="start" x="515.2" y="-273.29" font-family="Arial" font-size="14.00">artifact_standard_id </text>
|
|
26
|
+
<text text-anchor="start" x="642.06" y="-273.29" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
27
|
+
<polygon fill="none" stroke="black" stroke-width="3" points="506.7,-259.59 506.7,-370.19 874.87,-370.19 874.87,-259.59 506.7,-259.59"/>
|
|
28
|
+
</g>
|
|
29
|
+
<!-- artifact_standard_standards -->
|
|
30
|
+
<g id="node5" class="node">
|
|
31
|
+
<title>artifact_standard_standards</title>
|
|
32
|
+
<polygon fill="#efefef" stroke="none" points="532.06,-89.69 532.06,-135.69 849.51,-135.69 849.51,-89.69 532.06,-89.69"/>
|
|
33
|
+
<polygon fill="none" stroke="black" points="532.06,-89.69 532.06,-135.69 849.51,-135.69 849.51,-89.69 532.06,-89.69"/>
|
|
34
|
+
<text text-anchor="start" x="557.2" y="-113.49" font-family="Arial Bold" font-size="18.00">artifact_standard_standards</text>
|
|
35
|
+
<text text-anchor="start" x="755.12" y="-113.49" font-family="Arial" font-size="14.00"> </text>
|
|
36
|
+
<text text-anchor="start" x="786.24" y="-113.49" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
|
|
37
|
+
<text text-anchor="start" x="539.06" y="-99.09" font-family="Arial" font-size="14.00" fill="#333333">산출물 표준의 최상위 versioned definition을 관리한다.</text>
|
|
38
|
+
<polygon fill="none" stroke="black" points="532.06,-58.89 532.06,-89.69 849.51,-89.69 849.51,-58.89 532.06,-58.89"/>
|
|
39
|
+
<text text-anchor="start" x="539.06" y="-71.09" font-family="Arial" font-size="14.00">artifact_standard_id </text>
|
|
40
|
+
<text text-anchor="start" x="665.92" y="-71.09" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
41
|
+
</g>
|
|
42
|
+
<!-- artifact_standard_document_blueprints->artifact_standard_standards -->
|
|
43
|
+
<g id="edge4" class="edge">
|
|
44
|
+
<title>artifact_standard_document_blueprints:artifact_standard_id->artifact_standard_standards:artifact_standard_id</title>
|
|
45
|
+
<path fill="none" stroke="black" d="M691.38,-250.1C701.62,-170.22 840.56,-256.06 892.71,-178.89 922.57,-134.7 930.33,-96.7 892.71,-58.89 829.41,4.73 690.79,31.86 690.79,-57.89"/>
|
|
46
|
+
<polygon fill="black" stroke="black" points="691.4,-249.77 686.31,-259.49 691.09,-255.1 690.83,-259.42 690.83,-259.42 690.83,-259.42 691.09,-255.1 695.3,-260.02 691.4,-249.77"/>
|
|
47
|
+
</g>
|
|
48
|
+
<!-- artifact_standard_blueprint_nodes -->
|
|
49
|
+
<g id="node2" class="node">
|
|
50
|
+
<title>artifact_standard_blueprint_nodes</title>
|
|
51
|
+
<polygon fill="#efefef" stroke="none" points="43.2,-607.09 43.2,-642.69 372.37,-642.69 372.37,-607.09 43.2,-607.09"/>
|
|
52
|
+
<polygon fill="none" stroke="black" points="43.2,-607.09 43.2,-642.69 372.37,-642.69 372.37,-607.09 43.2,-607.09"/>
|
|
53
|
+
<text text-anchor="start" x="50.2" y="-620.49" font-family="Arial Bold" font-size="18.00">artifact_standard_blueprint_nodes</text>
|
|
54
|
+
<text text-anchor="start" x="296.12" y="-620.49" font-family="Arial" font-size="14.00"> </text>
|
|
55
|
+
<text text-anchor="start" x="327.24" y="-620.49" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
|
|
56
|
+
<polygon fill="none" stroke="black" points="43.2,-576.29 43.2,-607.09 372.37,-607.09 372.37,-576.29 43.2,-576.29"/>
|
|
57
|
+
<text text-anchor="start" x="50.2" y="-588.49" font-family="Arial" font-size="14.00">blueprint_node_id </text>
|
|
58
|
+
<text text-anchor="start" x="165.41" y="-588.49" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
59
|
+
<polygon fill="none" stroke="black" points="43.2,-545.49 43.2,-576.29 372.37,-576.29 372.37,-545.49 43.2,-545.49"/>
|
|
60
|
+
<text text-anchor="start" x="50.2" y="-557.69" font-family="Arial" font-size="14.00">blueprint_id </text>
|
|
61
|
+
<text text-anchor="start" x="126.48" y="-557.69" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
62
|
+
<polygon fill="none" stroke="black" points="43.2,-514.69 43.2,-545.49 372.37,-545.49 372.37,-514.69 43.2,-514.69"/>
|
|
63
|
+
<text text-anchor="start" x="50.2" y="-526.89" font-family="Arial" font-size="14.00">parent_blueprint_node_id </text>
|
|
64
|
+
<text text-anchor="start" x="212.89" y="-526.89" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
65
|
+
</g>
|
|
66
|
+
<!-- artifact_standard_blueprint_nodes->artifact_standard_document_blueprints -->
|
|
67
|
+
<g id="edge1" class="edge">
|
|
68
|
+
<title>artifact_standard_blueprint_nodes:blueprint_id->artifact_standard_document_blueprints:blueprint_id</title>
|
|
69
|
+
<path fill="none" stroke="black" d="M383.55,-559.99C423.46,-552.21 400.79,-495.28 423.79,-450.89 457.74,-385.35 433.4,-307.29 507.2,-307.29"/>
|
|
70
|
+
<polygon fill="black" stroke="black" points="383.67,-559.98 373.31,-556.38 378.35,-560.45 374.04,-560.83 374.04,-560.83 374.04,-560.83 378.35,-560.45 374.1,-565.34 383.67,-559.98"/>
|
|
71
|
+
</g>
|
|
72
|
+
<!-- artifact_standard_template_slots -->
|
|
73
|
+
<g id="node3" class="node">
|
|
74
|
+
<title>artifact_standard_template_slots</title>
|
|
75
|
+
<polygon fill="#efefef" stroke="none" points="476.42,-617.29 476.42,-663.29 905.15,-663.29 905.15,-617.29 476.42,-617.29"/>
|
|
76
|
+
<polygon fill="none" stroke="black" points="476.42,-617.29 476.42,-663.29 905.15,-663.29 905.15,-617.29 476.42,-617.29"/>
|
|
77
|
+
<text text-anchor="start" x="539.2" y="-641.09" font-family="Arial Bold" font-size="18.00">artifact_standard_template_slots</text>
|
|
78
|
+
<text text-anchor="start" x="773.12" y="-641.09" font-family="Arial" font-size="14.00"> </text>
|
|
79
|
+
<text text-anchor="start" x="804.24" y="-641.09" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
|
|
80
|
+
<text text-anchor="start" x="483.42" y="-626.69" font-family="Arial" font-size="14.00" fill="#333333">blueprint 내 section, table, figure, diagram 등이 들어갈 slot을 관리한다.</text>
|
|
81
|
+
<polygon fill="none" stroke="black" points="476.42,-586.49 476.42,-617.29 905.15,-617.29 905.15,-586.49 476.42,-586.49"/>
|
|
82
|
+
<text text-anchor="start" x="483.42" y="-598.69" font-family="Arial" font-size="14.00">template_slot_id </text>
|
|
83
|
+
<text text-anchor="start" x="589.26" y="-598.69" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
84
|
+
<polygon fill="none" stroke="black" points="476.42,-555.69 476.42,-586.49 905.15,-586.49 905.15,-555.69 476.42,-555.69"/>
|
|
85
|
+
<text text-anchor="start" x="483.42" y="-567.89" font-family="Arial" font-size="14.00">blueprint_id </text>
|
|
86
|
+
<text text-anchor="start" x="559.7" y="-567.89" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
87
|
+
<polygon fill="none" stroke="black" points="476.42,-524.89 476.42,-555.69 905.15,-555.69 905.15,-524.89 476.42,-524.89"/>
|
|
88
|
+
<text text-anchor="start" x="483.42" y="-537.09" font-family="Arial" font-size="14.00">blueprint_node_id </text>
|
|
89
|
+
<text text-anchor="start" x="598.63" y="-537.09" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
90
|
+
<polygon fill="none" stroke="black" points="476.42,-494.09 476.42,-524.89 905.15,-524.89 905.15,-494.09 476.42,-494.09"/>
|
|
91
|
+
<text text-anchor="start" x="483.42" y="-506.29" font-family="Arial" font-size="14.00">parent_template_slot_id </text>
|
|
92
|
+
<text text-anchor="start" x="636.74" y="-506.29" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
93
|
+
</g>
|
|
94
|
+
<!-- artifact_standard_template_slots->artifact_standard_document_blueprints -->
|
|
95
|
+
<g id="edge2" class="edge">
|
|
96
|
+
<title>artifact_standard_template_slots:blueprint_id->artifact_standard_document_blueprints:blueprint_id</title>
|
|
97
|
+
<path fill="none" stroke="black" d="M915.89,-568.31C961.25,-540.11 929.84,-307.29 874.37,-307.29"/>
|
|
98
|
+
<polygon fill="black" stroke="black" points="916.09,-568.25 905.24,-566.67 910.96,-569.72 906.79,-570.91 906.79,-570.91 906.79,-570.91 910.96,-569.72 907.71,-575.32 916.09,-568.25"/>
|
|
99
|
+
</g>
|
|
100
|
+
<!-- artifact_standard_document_components -->
|
|
101
|
+
<g id="node4" class="node">
|
|
102
|
+
<title>artifact_standard_document_components</title>
|
|
103
|
+
<polygon fill="#efefef" stroke="none" points="1009.71,-622.49 1009.71,-658.09 1389.87,-658.09 1389.87,-622.49 1009.71,-622.49"/>
|
|
104
|
+
<polygon fill="none" stroke="black" points="1009.71,-622.49 1009.71,-658.09 1389.87,-658.09 1389.87,-622.49 1009.71,-622.49"/>
|
|
105
|
+
<text text-anchor="start" x="1016.71" y="-635.89" font-family="Arial Bold" font-size="18.00">artifact_standard_document_components</text>
|
|
106
|
+
<text text-anchor="start" x="1313.61" y="-635.89" font-family="Arial" font-size="14.00"> </text>
|
|
107
|
+
<text text-anchor="start" x="1344.73" y="-635.89" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
|
|
108
|
+
<polygon fill="none" stroke="black" points="1009.71,-591.69 1009.71,-622.49 1389.87,-622.49 1389.87,-591.69 1009.71,-591.69"/>
|
|
109
|
+
<text text-anchor="start" x="1016.71" y="-603.89" font-family="Arial" font-size="14.00">document_component_id </text>
|
|
110
|
+
<text text-anchor="start" x="1177.82" y="-603.89" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
111
|
+
<polygon fill="none" stroke="black" points="1009.71,-560.89 1009.71,-591.69 1389.87,-591.69 1389.87,-560.89 1009.71,-560.89"/>
|
|
112
|
+
<text text-anchor="start" x="1016.71" y="-573.09" font-family="Arial" font-size="14.00">artifact_standard_id </text>
|
|
113
|
+
<text text-anchor="start" x="1143.56" y="-573.09" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
114
|
+
<polygon fill="none" stroke="black" points="1009.71,-530.09 1009.71,-560.89 1389.87,-560.89 1389.87,-530.09 1009.71,-530.09"/>
|
|
115
|
+
<text text-anchor="start" x="1016.71" y="-542.29" font-family="Arial" font-size="14.00">blueprint_id </text>
|
|
116
|
+
<text text-anchor="start" x="1092.98" y="-542.29" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
117
|
+
<polygon fill="none" stroke="black" points="1009.71,-499.29 1009.71,-530.09 1389.87,-530.09 1389.87,-499.29 1009.71,-499.29"/>
|
|
118
|
+
<text text-anchor="start" x="1016.71" y="-511.49" font-family="Arial" font-size="14.00">parent_document_component_id </text>
|
|
119
|
+
<text text-anchor="start" x="1225.3" y="-511.49" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
120
|
+
</g>
|
|
121
|
+
<!-- artifact_standard_document_components->artifact_standard_document_blueprints -->
|
|
122
|
+
<g id="edge3" class="edge">
|
|
123
|
+
<title>artifact_standard_document_components:blueprint_id->artifact_standard_document_blueprints:blueprint_id</title>
|
|
124
|
+
<path fill="none" stroke="black" d="M998.71,-544.55C963.84,-537.29 979.28,-489.31 957.79,-450.89 921.75,-386.47 948.18,-307.29 874.37,-307.29"/>
|
|
125
|
+
<polygon fill="black" stroke="black" points="998.42,-544.52 1007.95,-549.94 1003.73,-545.02 1008.04,-545.43 1008.04,-545.43 1008.04,-545.43 1003.73,-545.02 1008.79,-540.98 998.42,-544.52"/>
|
|
126
|
+
</g>
|
|
127
|
+
</g>
|
|
128
|
+
</svg>
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# artifact_standard_document_component_relations
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
<details>
|
|
6
|
+
<summary><strong>Table Definition</strong></summary>
|
|
7
|
+
|
|
8
|
+
```sql
|
|
9
|
+
CREATE TABLE artifact_standard_document_component_relations (
|
|
10
|
+
-- document component relation 식별자
|
|
11
|
+
document_component_relation_id CHAR(36) PRIMARY KEY
|
|
12
|
+
CHECK (length(document_component_relation_id) = 36),
|
|
13
|
+
|
|
14
|
+
-- 소속 산출물 표준 식별자
|
|
15
|
+
artifact_standard_id CHAR(36) NOT NULL
|
|
16
|
+
CHECK (length(artifact_standard_id) = 36),
|
|
17
|
+
|
|
18
|
+
-- source document component 식별자
|
|
19
|
+
source_document_component_id CHAR(36) NOT NULL
|
|
20
|
+
CHECK (length(source_document_component_id) = 36),
|
|
21
|
+
|
|
22
|
+
-- target document component 식별자
|
|
23
|
+
target_document_component_id CHAR(36) NOT NULL
|
|
24
|
+
CHECK (length(target_document_component_id) = 36),
|
|
25
|
+
|
|
26
|
+
-- 관계 유형 코드
|
|
27
|
+
relation_type_code VARCHAR(64) NOT NULL
|
|
28
|
+
CHECK (relation_type_code IN ('CONTAINS', 'DETAILS', 'SUPPORTS', 'REFERENCES')),
|
|
29
|
+
|
|
30
|
+
-- 필수 관계 여부
|
|
31
|
+
is_required INTEGER NOT NULL DEFAULT 0
|
|
32
|
+
CHECK (is_required IN (0, 1)),
|
|
33
|
+
|
|
34
|
+
-- 표시 정렬 순서
|
|
35
|
+
sort_order INTEGER NOT NULL DEFAULT 0,
|
|
36
|
+
|
|
37
|
+
-- 설명
|
|
38
|
+
description TEXT,
|
|
39
|
+
|
|
40
|
+
-- 생성 시각
|
|
41
|
+
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
42
|
+
|
|
43
|
+
-- 수정 시각
|
|
44
|
+
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
45
|
+
|
|
46
|
+
-- 확장 메타데이터
|
|
47
|
+
metadata_json JSON
|
|
48
|
+
CHECK (metadata_json IS NULL OR json_valid(metadata_json)),
|
|
49
|
+
|
|
50
|
+
FOREIGN KEY (artifact_standard_id)
|
|
51
|
+
REFERENCES artifact_standard_standards (artifact_standard_id)
|
|
52
|
+
ON DELETE CASCADE,
|
|
53
|
+
|
|
54
|
+
FOREIGN KEY (source_document_component_id)
|
|
55
|
+
REFERENCES artifact_standard_document_components (document_component_id)
|
|
56
|
+
ON DELETE CASCADE,
|
|
57
|
+
|
|
58
|
+
FOREIGN KEY (target_document_component_id)
|
|
59
|
+
REFERENCES artifact_standard_document_components (document_component_id)
|
|
60
|
+
ON DELETE CASCADE,
|
|
61
|
+
|
|
62
|
+
UNIQUE (source_document_component_id, target_document_component_id, relation_type_code)
|
|
63
|
+
)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
</details>
|
|
67
|
+
|
|
68
|
+
## Columns
|
|
69
|
+
|
|
70
|
+
| Name | Type | Default | Nullable | Parents |
|
|
71
|
+
| ------------------------------ | ----------- | ----------------- | -------- | --------------------------------------------------------------------------------- |
|
|
72
|
+
| document_component_relation_id | CHAR(36) | | true | |
|
|
73
|
+
| artifact_standard_id | CHAR(36) | | false | [artifact_standard_standards](artifact_standard_standards.md) |
|
|
74
|
+
| source_document_component_id | CHAR(36) | | false | [artifact_standard_document_components](artifact_standard_document_components.md) |
|
|
75
|
+
| target_document_component_id | CHAR(36) | | false | [artifact_standard_document_components](artifact_standard_document_components.md) |
|
|
76
|
+
| relation_type_code | VARCHAR(64) | | false | |
|
|
77
|
+
| is_required | INTEGER | 0 | false | |
|
|
78
|
+
| sort_order | INTEGER | 0 | false | |
|
|
79
|
+
| description | TEXT | | true | |
|
|
80
|
+
| created_at | DATETIME | CURRENT_TIMESTAMP | false | |
|
|
81
|
+
| updated_at | DATETIME | CURRENT_TIMESTAMP | false | |
|
|
82
|
+
| metadata_json | JSON | | true | |
|
|
83
|
+
|
|
84
|
+
## Constraints
|
|
85
|
+
|
|
86
|
+
| Name | Type | Definition |
|
|
87
|
+
| ----------------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
88
|
+
| document_component_relation_id | PRIMARY KEY | PRIMARY KEY (document_component_relation_id) |
|
|
89
|
+
| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (target_document_component_id) REFERENCES artifact_standard_document_components (document_component_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
|
|
90
|
+
| - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (source_document_component_id) REFERENCES artifact_standard_document_components (document_component_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
|
|
91
|
+
| - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
|
|
92
|
+
| sqlite_autoindex_artifact_standard_document_component_relations_2 | UNIQUE | UNIQUE (source_document_component_id, target_document_component_id, relation_type_code) |
|
|
93
|
+
| sqlite_autoindex_artifact_standard_document_component_relations_1 | PRIMARY KEY | PRIMARY KEY (document_component_relation_id) |
|
|
94
|
+
| - | CHECK | CHECK (length(document_component_relation_id) = 36) |
|
|
95
|
+
| - | CHECK | CHECK (length(artifact_standard_id) = 36) |
|
|
96
|
+
| - | CHECK | CHECK (length(source_document_component_id) = 36) |
|
|
97
|
+
| - | CHECK | CHECK (length(target_document_component_id) = 36) |
|
|
98
|
+
| - | CHECK | CHECK (relation_type_code IN ('CONTAINS', 'DETAILS', 'SUPPORTS', 'REFERENCES')) |
|
|
99
|
+
| - | CHECK | CHECK (is_required IN (0, 1)) |
|
|
100
|
+
| - | CHECK | CHECK (metadata_json IS NULL OR json_valid(metadata_json)) |
|
|
101
|
+
|
|
102
|
+
## Indexes
|
|
103
|
+
|
|
104
|
+
| Name | Definition |
|
|
105
|
+
| ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
106
|
+
| idx_artifact_standard_document_component_relations_target | CREATE INDEX idx_artifact_standard_document_component_relations_target<br /> ON artifact_standard_document_component_relations (target_document_component_id) |
|
|
107
|
+
| idx_artifact_standard_document_component_relations_source | CREATE INDEX idx_artifact_standard_document_component_relations_source<br /> ON artifact_standard_document_component_relations (source_document_component_id) |
|
|
108
|
+
| idx_artifact_standard_document_component_relations_standard | CREATE INDEX idx_artifact_standard_document_component_relations_standard<br /> ON artifact_standard_document_component_relations (artifact_standard_id) |
|
|
109
|
+
| sqlite_autoindex_artifact_standard_document_component_relations_2 | UNIQUE (source_document_component_id, target_document_component_id, relation_type_code) |
|
|
110
|
+
| sqlite_autoindex_artifact_standard_document_component_relations_1 | PRIMARY KEY (document_component_relation_id) |
|
|
111
|
+
|
|
112
|
+
## Relations
|
|
113
|
+
|
|
114
|
+

|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
> Generated by [tbls](https://github.com/k1LoW/tbls)
|
|
@@ -0,0 +1,87 @@
|
|
|
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: artifact_standard_document_component_relations Pages: 1 -->
|
|
7
|
+
<svg width="947pt" height="540pt"
|
|
8
|
+
viewBox="0.00 0.00 947.28 540.40" 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 536.4)">
|
|
10
|
+
<title>artifact_standard_document_component_relations</title>
|
|
11
|
+
<polygon fill="white" stroke="none" points="-4,4 -4,-536.4 943.28,-536.4 943.28,4 -4,4"/>
|
|
12
|
+
<!-- artifact_standard_document_component_relations -->
|
|
13
|
+
<g id="node1" class="node">
|
|
14
|
+
<title>artifact_standard_document_component_relations</title>
|
|
15
|
+
<polygon fill="#efefef" stroke="none" points="432.86,-450.6 432.86,-486.2 876.99,-486.2 876.99,-450.6 432.86,-450.6"/>
|
|
16
|
+
<polygon fill="none" stroke="black" points="432.86,-450.6 432.86,-486.2 876.99,-486.2 876.99,-450.6 432.86,-450.6"/>
|
|
17
|
+
<text text-anchor="start" x="439.86" y="-464" font-family="Arial Bold" font-size="18.00">artifact_standard_document_component_relations</text>
|
|
18
|
+
<text text-anchor="start" x="800.74" y="-464" font-family="Arial" font-size="14.00"> </text>
|
|
19
|
+
<text text-anchor="start" x="831.85" y="-464" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
|
|
20
|
+
<polygon fill="none" stroke="black" points="432.86,-419.8 432.86,-450.6 876.99,-450.6 876.99,-419.8 432.86,-419.8"/>
|
|
21
|
+
<text text-anchor="start" x="439.86" y="-432" font-family="Arial" font-size="14.00">document_component_relation_id </text>
|
|
22
|
+
<text text-anchor="start" x="654.67" y="-432" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
23
|
+
<polygon fill="none" stroke="black" points="432.86,-389 432.86,-419.8 876.99,-419.8 876.99,-389 432.86,-389"/>
|
|
24
|
+
<text text-anchor="start" x="439.86" y="-401.2" font-family="Arial" font-size="14.00">artifact_standard_id </text>
|
|
25
|
+
<text text-anchor="start" x="566.71" y="-401.2" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
26
|
+
<polygon fill="none" stroke="black" points="432.86,-358.2 432.86,-389 876.99,-389 876.99,-358.2 432.86,-358.2"/>
|
|
27
|
+
<text text-anchor="start" x="439.86" y="-370.4" font-family="Arial" font-size="14.00">source_document_component_id </text>
|
|
28
|
+
<text text-anchor="start" x="650.77" y="-370.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
29
|
+
<polygon fill="none" stroke="black" points="432.86,-327.4 432.86,-358.2 876.99,-358.2 876.99,-327.4 432.86,-327.4"/>
|
|
30
|
+
<text text-anchor="start" x="439.86" y="-339.6" font-family="Arial" font-size="14.00">target_document_component_id </text>
|
|
31
|
+
<text text-anchor="start" x="644.55" y="-339.6" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
32
|
+
<polygon fill="none" stroke="black" stroke-width="3" points="431.36,-325.9 431.36,-487.7 878.49,-487.7 878.49,-325.9 431.36,-325.9"/>
|
|
33
|
+
</g>
|
|
34
|
+
<!-- artifact_standard_standards -->
|
|
35
|
+
<g id="node2" class="node">
|
|
36
|
+
<title>artifact_standard_standards</title>
|
|
37
|
+
<polygon fill="#efefef" stroke="none" points="43.2,-115 43.2,-161 360.65,-161 360.65,-115 43.2,-115"/>
|
|
38
|
+
<polygon fill="none" stroke="black" points="43.2,-115 43.2,-161 360.65,-161 360.65,-115 43.2,-115"/>
|
|
39
|
+
<text text-anchor="start" x="68.34" y="-138.8" font-family="Arial Bold" font-size="18.00">artifact_standard_standards</text>
|
|
40
|
+
<text text-anchor="start" x="266.26" y="-138.8" font-family="Arial" font-size="14.00"> </text>
|
|
41
|
+
<text text-anchor="start" x="297.37" y="-138.8" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
|
|
42
|
+
<text text-anchor="start" x="50.2" y="-124.4" font-family="Arial" font-size="14.00" fill="#333333">산출물 표준의 최상위 versioned definition을 관리한다.</text>
|
|
43
|
+
<polygon fill="none" stroke="black" points="43.2,-84.2 43.2,-115 360.65,-115 360.65,-84.2 43.2,-84.2"/>
|
|
44
|
+
<text text-anchor="start" x="50.2" y="-96.4" font-family="Arial" font-size="14.00">artifact_standard_id </text>
|
|
45
|
+
<text text-anchor="start" x="177.05" y="-96.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
46
|
+
</g>
|
|
47
|
+
<!-- artifact_standard_document_component_relations->artifact_standard_standards -->
|
|
48
|
+
<g id="edge1" class="edge">
|
|
49
|
+
<title>artifact_standard_document_component_relations:artifact_standard_id->artifact_standard_standards:artifact_standard_id</title>
|
|
50
|
+
<path fill="none" stroke="black" d="M421.57,-403.78C303.56,-388.54 497,-99.6 361.65,-99.6"/>
|
|
51
|
+
<polygon fill="black" stroke="black" points="421.54,-403.77 431.25,-408.87 426.87,-404.1 431.19,-404.36 431.19,-404.36 431.19,-404.36 426.87,-404.1 431.8,-399.89 421.54,-403.77"/>
|
|
52
|
+
</g>
|
|
53
|
+
<!-- artifact_standard_document_components -->
|
|
54
|
+
<g id="node3" class="node">
|
|
55
|
+
<title>artifact_standard_document_components</title>
|
|
56
|
+
<polygon fill="#efefef" stroke="none" points="464.84,-166.4 464.84,-202 845,-202 845,-166.4 464.84,-166.4"/>
|
|
57
|
+
<polygon fill="none" stroke="black" points="464.84,-166.4 464.84,-202 845,-202 845,-166.4 464.84,-166.4"/>
|
|
58
|
+
<text text-anchor="start" x="471.84" y="-179.8" font-family="Arial Bold" font-size="18.00">artifact_standard_document_components</text>
|
|
59
|
+
<text text-anchor="start" x="768.75" y="-179.8" font-family="Arial" font-size="14.00"> </text>
|
|
60
|
+
<text text-anchor="start" x="799.87" y="-179.8" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
|
|
61
|
+
<polygon fill="none" stroke="black" points="464.84,-135.6 464.84,-166.4 845,-166.4 845,-135.6 464.84,-135.6"/>
|
|
62
|
+
<text text-anchor="start" x="471.84" y="-147.8" font-family="Arial" font-size="14.00">document_component_id </text>
|
|
63
|
+
<text text-anchor="start" x="632.95" y="-147.8" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
64
|
+
<polygon fill="none" stroke="black" points="464.84,-104.8 464.84,-135.6 845,-135.6 845,-104.8 464.84,-104.8"/>
|
|
65
|
+
<text text-anchor="start" x="471.84" y="-117" font-family="Arial" font-size="14.00">artifact_standard_id </text>
|
|
66
|
+
<text text-anchor="start" x="598.7" y="-117" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
67
|
+
<polygon fill="none" stroke="black" points="464.84,-74 464.84,-104.8 845,-104.8 845,-74 464.84,-74"/>
|
|
68
|
+
<text text-anchor="start" x="471.84" y="-86.2" font-family="Arial" font-size="14.00">blueprint_id </text>
|
|
69
|
+
<text text-anchor="start" x="548.12" y="-86.2" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
70
|
+
<polygon fill="none" stroke="black" points="464.84,-43.2 464.84,-74 845,-74 845,-43.2 464.84,-43.2"/>
|
|
71
|
+
<text text-anchor="start" x="471.84" y="-55.4" font-family="Arial" font-size="14.00">parent_document_component_id </text>
|
|
72
|
+
<text text-anchor="start" x="680.44" y="-55.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
|
|
73
|
+
</g>
|
|
74
|
+
<!-- artifact_standard_document_component_relations->artifact_standard_document_components -->
|
|
75
|
+
<g id="edge2" class="edge">
|
|
76
|
+
<title>artifact_standard_document_component_relations:source_document_component_id->artifact_standard_document_components:document_component_id</title>
|
|
77
|
+
<path fill="none" stroke="black" d="M888.31,-372.75C975.54,-357.8 942.34,-151 846,-151"/>
|
|
78
|
+
<polygon fill="black" stroke="black" points="888.29,-372.75 877.95,-369.09 882.97,-373.19 878.66,-373.55 878.66,-373.55 878.66,-373.55 882.97,-373.19 878.69,-378.06 888.29,-372.75"/>
|
|
79
|
+
</g>
|
|
80
|
+
<!-- artifact_standard_document_component_relations->artifact_standard_document_components -->
|
|
81
|
+
<g id="edge3" class="edge">
|
|
82
|
+
<title>artifact_standard_document_component_relations:target_document_component_id->artifact_standard_document_components:document_component_id</title>
|
|
83
|
+
<path fill="none" stroke="black" d="M655.55,-316.43C665.65,-241.09 795.97,-318.61 845,-245.2 868.26,-210.38 887.87,-151 846,-151"/>
|
|
84
|
+
<polygon fill="black" stroke="black" points="655.57,-316.09 650.45,-325.79 655.24,-321.41 654.97,-325.73 654.97,-325.73 654.97,-325.73 655.24,-321.41 659.44,-326.35 655.57,-316.09"/>
|
|
85
|
+
</g>
|
|
86
|
+
</g>
|
|
87
|
+
</svg>
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# artifact_standard_document_components
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
<details>
|
|
6
|
+
<summary><strong>Table Definition</strong></summary>
|
|
7
|
+
|
|
8
|
+
```sql
|
|
9
|
+
CREATE TABLE artifact_standard_document_components (
|
|
10
|
+
-- document component 식별자
|
|
11
|
+
document_component_id CHAR(36) PRIMARY KEY
|
|
12
|
+
CHECK (length(document_component_id) = 36),
|
|
13
|
+
|
|
14
|
+
-- 소속 산출물 표준 식별자
|
|
15
|
+
artifact_standard_id CHAR(36) NOT NULL
|
|
16
|
+
CHECK (length(artifact_standard_id) = 36),
|
|
17
|
+
|
|
18
|
+
-- 관련 blueprint 식별자
|
|
19
|
+
blueprint_id CHAR(36)
|
|
20
|
+
CHECK (blueprint_id IS NULL OR length(blueprint_id) = 36),
|
|
21
|
+
|
|
22
|
+
-- 부모 document component 식별자
|
|
23
|
+
parent_document_component_id CHAR(36)
|
|
24
|
+
CHECK (parent_document_component_id IS NULL OR length(parent_document_component_id) = 36),
|
|
25
|
+
|
|
26
|
+
-- document component 코드
|
|
27
|
+
document_component_code VARCHAR(128) NOT NULL,
|
|
28
|
+
|
|
29
|
+
-- document component 이름
|
|
30
|
+
document_component_name VARCHAR(256) NOT NULL,
|
|
31
|
+
|
|
32
|
+
-- component 역할 코드. 본문, 부록, 보조자료, 통제정보 등을 구분한다.
|
|
33
|
+
component_role_code VARCHAR(64) NOT NULL DEFAULT 'MAIN'
|
|
34
|
+
CHECK (component_role_code IN ('MAIN', 'APPENDIX', 'SUPPORTING', 'CONTROL')),
|
|
35
|
+
|
|
36
|
+
-- component 유형 코드. 산출물 표준별로 정의하는 업무적 유형 코드다.
|
|
37
|
+
component_type_code VARCHAR(128) NOT NULL,
|
|
38
|
+
|
|
39
|
+
-- 표현 방식 코드. 하나의 document 내부 node인지, 별도 document인지 구분한다.
|
|
40
|
+
representation_code VARCHAR(64) NOT NULL DEFAULT 'SEPARATE_DOCUMENT'
|
|
41
|
+
CHECK (representation_code IN ('INTERNAL_NODE', 'SEPARATE_DOCUMENT')),
|
|
42
|
+
|
|
43
|
+
-- 논리 계층 level. 물리 폴더 깊이를 의미하지 않는다.
|
|
44
|
+
logical_level INTEGER NOT NULL DEFAULT 0
|
|
45
|
+
CHECK (logical_level >= 0),
|
|
46
|
+
|
|
47
|
+
-- 필수 여부
|
|
48
|
+
is_required INTEGER NOT NULL DEFAULT 1
|
|
49
|
+
CHECK (is_required IN (0, 1)),
|
|
50
|
+
|
|
51
|
+
-- 반복 가능 여부
|
|
52
|
+
is_repeatable INTEGER NOT NULL DEFAULT 0
|
|
53
|
+
CHECK (is_repeatable IN (0, 1)),
|
|
54
|
+
|
|
55
|
+
-- 표시 정렬 순서
|
|
56
|
+
sort_order INTEGER NOT NULL DEFAULT 0,
|
|
57
|
+
|
|
58
|
+
-- 설명
|
|
59
|
+
description TEXT,
|
|
60
|
+
|
|
61
|
+
-- 생성 시각
|
|
62
|
+
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
63
|
+
|
|
64
|
+
-- 수정 시각
|
|
65
|
+
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
66
|
+
|
|
67
|
+
-- 확장 메타데이터
|
|
68
|
+
metadata_json JSON
|
|
69
|
+
CHECK (metadata_json IS NULL OR json_valid(metadata_json)),
|
|
70
|
+
|
|
71
|
+
FOREIGN KEY (artifact_standard_id)
|
|
72
|
+
REFERENCES artifact_standard_standards (artifact_standard_id)
|
|
73
|
+
ON DELETE CASCADE,
|
|
74
|
+
|
|
75
|
+
FOREIGN KEY (blueprint_id)
|
|
76
|
+
REFERENCES artifact_standard_document_blueprints (blueprint_id)
|
|
77
|
+
ON DELETE SET NULL,
|
|
78
|
+
|
|
79
|
+
FOREIGN KEY (parent_document_component_id)
|
|
80
|
+
REFERENCES artifact_standard_document_components (document_component_id)
|
|
81
|
+
ON DELETE CASCADE,
|
|
82
|
+
|
|
83
|
+
UNIQUE (artifact_standard_id, document_component_code)
|
|
84
|
+
)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
</details>
|
|
88
|
+
|
|
89
|
+
## Columns
|
|
90
|
+
|
|
91
|
+
| Name | Type | Default | Nullable | Children | Parents |
|
|
92
|
+
| ---------------------------- | ------------ | ------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- |
|
|
93
|
+
| document_component_id | CHAR(36) | | true | [artifact_standard_document_components](artifact_standard_document_components.md) [artifact_standard_document_component_relations](artifact_standard_document_component_relations.md) [artifact_standard_physical_structure_policies](artifact_standard_physical_structure_policies.md) | |
|
|
94
|
+
| artifact_standard_id | CHAR(36) | | false | | [artifact_standard_standards](artifact_standard_standards.md) |
|
|
95
|
+
| blueprint_id | CHAR(36) | | true | | [artifact_standard_document_blueprints](artifact_standard_document_blueprints.md) |
|
|
96
|
+
| parent_document_component_id | CHAR(36) | | true | | [artifact_standard_document_components](artifact_standard_document_components.md) |
|
|
97
|
+
| document_component_code | VARCHAR(128) | | false | | |
|
|
98
|
+
| document_component_name | VARCHAR(256) | | false | | |
|
|
99
|
+
| component_role_code | VARCHAR(64) | 'MAIN' | false | | |
|
|
100
|
+
| component_type_code | VARCHAR(128) | | false | | |
|
|
101
|
+
| representation_code | VARCHAR(64) | 'SEPARATE_DOCUMENT' | false | | |
|
|
102
|
+
| logical_level | INTEGER | 0 | false | | |
|
|
103
|
+
| is_required | INTEGER | 1 | false | | |
|
|
104
|
+
| is_repeatable | INTEGER | 0 | false | | |
|
|
105
|
+
| sort_order | INTEGER | 0 | false | | |
|
|
106
|
+
| description | TEXT | | true | | |
|
|
107
|
+
| created_at | DATETIME | CURRENT_TIMESTAMP | false | | |
|
|
108
|
+
| updated_at | DATETIME | CURRENT_TIMESTAMP | false | | |
|
|
109
|
+
| metadata_json | JSON | | true | | |
|
|
110
|
+
|
|
111
|
+
## Constraints
|
|
112
|
+
|
|
113
|
+
| Name | Type | Definition |
|
|
114
|
+
| -------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
115
|
+
| document_component_id | PRIMARY KEY | PRIMARY KEY (document_component_id) |
|
|
116
|
+
| - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (parent_document_component_id) REFERENCES artifact_standard_document_components (document_component_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
|
|
117
|
+
| - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (blueprint_id) REFERENCES artifact_standard_document_blueprints (blueprint_id) ON UPDATE NO ACTION ON DELETE SET NULL MATCH NONE |
|
|
118
|
+
| - (Foreign key ID: 2) | FOREIGN KEY | FOREIGN KEY (artifact_standard_id) REFERENCES artifact_standard_standards (artifact_standard_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
|
|
119
|
+
| sqlite_autoindex_artifact_standard_document_components_2 | UNIQUE | UNIQUE (artifact_standard_id, document_component_code) |
|
|
120
|
+
| sqlite_autoindex_artifact_standard_document_components_1 | PRIMARY KEY | PRIMARY KEY (document_component_id) |
|
|
121
|
+
| - | CHECK | CHECK (length(document_component_id) = 36) |
|
|
122
|
+
| - | CHECK | CHECK (length(artifact_standard_id) = 36) |
|
|
123
|
+
| - | CHECK | CHECK (blueprint_id IS NULL OR length(blueprint_id) = 36) |
|
|
124
|
+
| - | CHECK | CHECK (parent_document_component_id IS NULL OR length(parent_document_component_id) = 36) |
|
|
125
|
+
| - | CHECK | CHECK (component_role_code IN ('MAIN', 'APPENDIX', 'SUPPORTING', 'CONTROL')) |
|
|
126
|
+
| - | CHECK | CHECK (representation_code IN ('INTERNAL_NODE', 'SEPARATE_DOCUMENT')) |
|
|
127
|
+
| - | CHECK | CHECK (logical_level >= 0) |
|
|
128
|
+
| - | CHECK | CHECK (is_required IN (0, 1)) |
|
|
129
|
+
| - | CHECK | CHECK (is_repeatable IN (0, 1)) |
|
|
130
|
+
| - | CHECK | CHECK (metadata_json IS NULL OR json_valid(metadata_json)) |
|
|
131
|
+
|
|
132
|
+
## Indexes
|
|
133
|
+
|
|
134
|
+
| Name | Definition |
|
|
135
|
+
| -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
136
|
+
| idx_artifact_standard_document_components_role_type | CREATE INDEX idx_artifact_standard_document_components_role_type<br /> ON artifact_standard_document_components (artifact_standard_id, component_role_code, component_type_code) |
|
|
137
|
+
| idx_artifact_standard_document_components_parent | CREATE INDEX idx_artifact_standard_document_components_parent<br /> ON artifact_standard_document_components (parent_document_component_id) |
|
|
138
|
+
| idx_artifact_standard_document_components_standard | CREATE INDEX idx_artifact_standard_document_components_standard<br /> ON artifact_standard_document_components (artifact_standard_id) |
|
|
139
|
+
| sqlite_autoindex_artifact_standard_document_components_2 | UNIQUE (artifact_standard_id, document_component_code) |
|
|
140
|
+
| sqlite_autoindex_artifact_standard_document_components_1 | PRIMARY KEY (document_component_id) |
|
|
141
|
+
|
|
142
|
+
## Relations
|
|
143
|
+
|
|
144
|
+

|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
> Generated by [tbls](https://github.com/k1LoW/tbls)
|