@soddong/agentic-domain-artifact 0.7.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 (63) hide show
  1. package/.tbls.yml +46 -0
  2. package/CHANGELOG.md +53 -0
  3. package/README.md +254 -0
  4. package/dist/database.d.ts +8 -0
  5. package/dist/database.d.ts.map +1 -0
  6. package/dist/database.js +76 -0
  7. package/dist/database.js.map +1 -0
  8. package/dist/fixtures.d.ts +7 -0
  9. package/dist/fixtures.d.ts.map +1 -0
  10. package/dist/fixtures.js +88 -0
  11. package/dist/fixtures.js.map +1 -0
  12. package/dist/index.d.ts +26 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +18 -0
  15. package/dist/index.js.map +1 -0
  16. package/dist/repositories.d.ts +29 -0
  17. package/dist/repositories.d.ts.map +1 -0
  18. package/dist/repositories.js +305 -0
  19. package/dist/repositories.js.map +1 -0
  20. package/dist/seed-apply.d.ts +22 -0
  21. package/dist/seed-apply.d.ts.map +1 -0
  22. package/dist/seed-apply.js +150 -0
  23. package/dist/seed-apply.js.map +1 -0
  24. package/dist/service.d.ts +32 -0
  25. package/dist/service.d.ts.map +1 -0
  26. package/dist/service.js +282 -0
  27. package/dist/service.js.map +1 -0
  28. package/dist/types.d.ts +264 -0
  29. package/dist/types.d.ts.map +1 -0
  30. package/dist/types.js +2 -0
  31. package/dist/types.js.map +1 -0
  32. package/docs/build.md +19 -0
  33. package/docs/configuration.md +27 -0
  34. package/docs/delivery.md +22 -0
  35. package/docs/operations.md +27 -0
  36. package/docs/publishing.md +29 -0
  37. package/docs/schema/generated/README.md +28 -0
  38. package/docs/schema/generated/artifact_code_groups.md +57 -0
  39. package/docs/schema/generated/artifact_code_groups.svg +49 -0
  40. package/docs/schema/generated/artifact_codes.md +71 -0
  41. package/docs/schema/generated/artifact_codes.svg +49 -0
  42. package/docs/schema/generated/artifact_component_instances.md +79 -0
  43. package/docs/schema/generated/artifact_component_instances.svg +177 -0
  44. package/docs/schema/generated/artifact_instances.md +79 -0
  45. package/docs/schema/generated/artifact_instances.svg +177 -0
  46. package/docs/schema/generated/artifact_resource_links.md +89 -0
  47. package/docs/schema/generated/artifact_resource_links.svg +74 -0
  48. package/docs/schema/generated/artifact_review_decision_refs.md +89 -0
  49. package/docs/schema/generated/artifact_review_decision_refs.svg +102 -0
  50. package/docs/schema/generated/artifact_schema_migrations.md +47 -0
  51. package/docs/schema/generated/artifact_schema_migrations.svg +27 -0
  52. package/docs/schema/generated/artifact_status_events.md +96 -0
  53. package/docs/schema/generated/artifact_status_events.svg +102 -0
  54. package/docs/schema/generated/artifact_trace_links.md +93 -0
  55. package/docs/schema/generated/artifact_trace_links.svg +74 -0
  56. package/docs/schema/generated/artifact_validation_result_refs.md +82 -0
  57. package/docs/schema/generated/artifact_validation_result_refs.svg +74 -0
  58. package/docs/schema/generated/schema.json +1799 -0
  59. package/docs/schema/generated/schema.mmd +132 -0
  60. package/docs/schema/generated/schema.svg +260 -0
  61. package/docs/usage.md +190 -0
  62. package/package.json +28 -0
  63. package/src/database/migrations/0001_artifact_base.sql +345 -0
@@ -0,0 +1,79 @@
1
+ # artifact_instances
2
+
3
+ ## Description
4
+
5
+ 실제 산출물 instance를 관리한다.
6
+
7
+ <details>
8
+ <summary><strong>Table Definition</strong></summary>
9
+
10
+ ```sql
11
+ CREATE TABLE artifact_instances (
12
+ artifact_instance_id CHAR(36) PRIMARY KEY
13
+ CHECK (length(artifact_instance_id) = 36),
14
+ artifact_code VARCHAR(128) NOT NULL,
15
+ artifact_name VARCHAR(256) NOT NULL,
16
+ artifact_version VARCHAR(64) NOT NULL DEFAULT '0.1.0',
17
+ artifact_standard_code VARCHAR(128) NOT NULL,
18
+ artifact_standard_version VARCHAR(64) NOT NULL,
19
+ artifact_status_code VARCHAR(64) NOT NULL DEFAULT 'draft'
20
+ CHECK (artifact_status_code IN ('draft', 'in_review', 'approved', 'published', 'archived', 'deprecated')),
21
+ methodology_activity_id CHAR(36)
22
+ CHECK (methodology_activity_id IS NULL OR length(methodology_activity_id) = 36),
23
+ owner_role_code VARCHAR(128),
24
+ created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
25
+ updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
26
+ metadata_json JSON
27
+ CHECK (metadata_json IS NULL OR json_valid(metadata_json)),
28
+
29
+ UNIQUE (artifact_code, artifact_version)
30
+ )
31
+ ```
32
+
33
+ </details>
34
+
35
+ ## Columns
36
+
37
+ | Name | Type | Default | Nullable | Children |
38
+ | ------------------------- | ------------ | ----------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
39
+ | artifact_instance_id | CHAR(36) | | true | [artifact_component_instances](artifact_component_instances.md) [artifact_resource_links](artifact_resource_links.md) [artifact_trace_links](artifact_trace_links.md) [artifact_validation_result_refs](artifact_validation_result_refs.md) [artifact_review_decision_refs](artifact_review_decision_refs.md) [artifact_status_events](artifact_status_events.md) |
40
+ | artifact_code | VARCHAR(128) | | false | |
41
+ | artifact_name | VARCHAR(256) | | false | |
42
+ | artifact_version | VARCHAR(64) | '0.1.0' | false | |
43
+ | artifact_standard_code | VARCHAR(128) | | false | |
44
+ | artifact_standard_version | VARCHAR(64) | | false | |
45
+ | artifact_status_code | VARCHAR(64) | 'draft' | false | |
46
+ | methodology_activity_id | CHAR(36) | | true | |
47
+ | owner_role_code | VARCHAR(128) | | true | |
48
+ | created_at | DATETIME | CURRENT_TIMESTAMP | false | |
49
+ | updated_at | DATETIME | CURRENT_TIMESTAMP | false | |
50
+ | metadata_json | JSON | | true | |
51
+
52
+ ## Constraints
53
+
54
+ | Name | Type | Definition |
55
+ | ------------------------------------- | ----------- | --------------------------------------------------------------------------------------------------------- |
56
+ | artifact_instance_id | PRIMARY KEY | PRIMARY KEY (artifact_instance_id) |
57
+ | sqlite_autoindex_artifact_instances_2 | UNIQUE | UNIQUE (artifact_code, artifact_version) |
58
+ | sqlite_autoindex_artifact_instances_1 | PRIMARY KEY | PRIMARY KEY (artifact_instance_id) |
59
+ | - | CHECK | CHECK (length(artifact_instance_id) = 36) |
60
+ | - | CHECK | CHECK (artifact_status_code IN ('draft', 'in_review', 'approved', 'published', 'archived', 'deprecated')) |
61
+ | - | CHECK | CHECK (methodology_activity_id IS NULL OR length(methodology_activity_id) = 36) |
62
+ | - | CHECK | CHECK (metadata_json IS NULL OR json_valid(metadata_json)) |
63
+
64
+ ## Indexes
65
+
66
+ | Name | Definition |
67
+ | ------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
68
+ | idx_artifact_instances_status | CREATE INDEX idx_artifact_instances_status<br /> ON artifact_instances (artifact_status_code) |
69
+ | idx_artifact_instances_standard | CREATE INDEX idx_artifact_instances_standard<br /> ON artifact_instances (artifact_standard_code, artifact_standard_version) |
70
+ | sqlite_autoindex_artifact_instances_2 | UNIQUE (artifact_code, artifact_version) |
71
+ | sqlite_autoindex_artifact_instances_1 | PRIMARY KEY (artifact_instance_id) |
72
+
73
+ ## Relations
74
+
75
+ ![er](artifact_instances.svg)
76
+
77
+ ---
78
+
79
+ > Generated by [tbls](https://github.com/k1LoW/tbls)
@@ -0,0 +1,177 @@
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_instances Pages: 1 -->
7
+ <svg width="3013pt" height="469pt"
8
+ viewBox="0.00 0.00 3013.19 468.80" 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 464.8)">
10
+ <title>artifact_instances</title>
11
+ <polygon fill="white" stroke="none" points="-4,4 -4,-464.8 3009.19,-464.8 3009.19,4 -4,4"/>
12
+ <!-- artifact_instances -->
13
+ <g id="node1" class="node">
14
+ <title>artifact_instances</title>
15
+ <polygon fill="#efefef" stroke="none" points="1472.11,-77 1472.11,-123 1682.97,-123 1682.97,-77 1472.11,-77"/>
16
+ <polygon fill="none" stroke="black" points="1472.11,-77 1472.11,-123 1682.97,-123 1682.97,-77 1472.11,-77"/>
17
+ <text text-anchor="start" x="1479.94" y="-100.8" font-family="Arial Bold" font-size="18.00">artifact_instances</text>
18
+ <text text-anchor="start" x="1605.88" y="-100.8" font-family="Arial" font-size="14.00">    </text>
19
+ <text text-anchor="start" x="1637" y="-100.8" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
20
+ <text text-anchor="start" x="1485.34" y="-86.4" font-family="Arial" font-size="14.00" fill="#333333">실제 산출물 instance를 관리한다.</text>
21
+ <polygon fill="none" stroke="black" points="1472.11,-46.2 1472.11,-77 1682.97,-77 1682.97,-46.2 1472.11,-46.2"/>
22
+ <text text-anchor="start" x="1479.11" y="-58.4" font-family="Arial" font-size="14.00">artifact_instance_id </text>
23
+ <text text-anchor="start" x="1603.63" y="-58.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
24
+ <polygon fill="none" stroke="black" stroke-width="3" points="1470.61,-44.7 1470.61,-124.5 1684.47,-124.5 1684.47,-44.7 1470.61,-44.7"/>
25
+ </g>
26
+ <!-- artifact_component_instances -->
27
+ <g id="node2" class="node">
28
+ <title>artifact_component_instances</title>
29
+ <polygon fill="#efefef" stroke="none" points="43.2,-340.8 43.2,-386.8 415.88,-386.8 415.88,-340.8 43.2,-340.8"/>
30
+ <polygon fill="none" stroke="black" points="43.2,-340.8 43.2,-386.8 415.88,-386.8 415.88,-340.8 43.2,-340.8"/>
31
+ <text text-anchor="start" x="87.45" y="-364.6" font-family="Arial Bold" font-size="18.00">artifact_component_instances</text>
32
+ <text text-anchor="start" x="302.37" y="-364.6" font-family="Arial" font-size="14.00">    </text>
33
+ <text text-anchor="start" x="333.49" y="-364.6" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
34
+ <text text-anchor="start" x="50.2" y="-350.2" font-family="Arial" font-size="14.00" fill="#333333">실제 산출물 안의 본문, 부록 등 component instance를 관리한다.</text>
35
+ <polygon fill="none" stroke="black" points="43.2,-310 43.2,-340.8 415.88,-340.8 415.88,-310 43.2,-310"/>
36
+ <text text-anchor="start" x="50.2" y="-322.2" font-family="Arial" font-size="14.00">artifact_component_instance_id </text>
37
+ <text text-anchor="start" x="251.77" y="-322.2" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
38
+ <polygon fill="none" stroke="black" points="43.2,-279.2 43.2,-310 415.88,-310 415.88,-279.2 43.2,-279.2"/>
39
+ <text text-anchor="start" x="50.2" y="-291.4" font-family="Arial" font-size="14.00">artifact_instance_id </text>
40
+ <text text-anchor="start" x="174.72" y="-291.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
41
+ </g>
42
+ <!-- artifact_component_instances&#45;&gt;artifact_instances -->
43
+ <g id="edge1" class="edge">
44
+ <title>artifact_component_instances:artifact_instance_id&#45;&gt;artifact_instances:artifact_instance_id</title>
45
+ <path fill="none" stroke="black" d="M427.01,-293.25C457.44,-283.94 433.06,-228.73 467.54,-205.2 653.64,-78.24 1245.82,-61.6 1471.11,-61.6"/>
46
+ <polygon fill="black" stroke="black" points="427.13,-293.24 416.62,-290.1 421.84,-293.94 417.54,-294.51 417.54,-294.51 417.54,-294.51 421.84,-293.94 417.81,-299.02 427.13,-293.24"/>
47
+ </g>
48
+ <!-- artifact_resource_links -->
49
+ <g id="node3" class="node">
50
+ <title>artifact_resource_links</title>
51
+ <polygon fill="#efefef" stroke="none" points="520.16,-356.2 520.16,-402.2 1004.93,-402.2 1004.93,-356.2 520.16,-356.2"/>
52
+ <polygon fill="none" stroke="black" points="520.16,-356.2 520.16,-402.2 1004.93,-402.2 1004.93,-356.2 520.16,-356.2"/>
53
+ <text text-anchor="start" x="645.45" y="-380" font-family="Arial Bold" font-size="18.00">artifact_resource_links</text>
54
+ <text text-anchor="start" x="810.38" y="-380" font-family="Arial" font-size="14.00">    </text>
55
+ <text text-anchor="start" x="841.49" y="-380" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
56
+ <text text-anchor="start" x="527.16" y="-365.6" font-family="Arial" font-size="14.00" fill="#333333">산출물 instance 또는 component instance와 document/file/resource를 연결한다.</text>
57
+ <polygon fill="none" stroke="black" points="520.16,-325.4 520.16,-356.2 1004.93,-356.2 1004.93,-325.4 520.16,-325.4"/>
58
+ <text text-anchor="start" x="527.16" y="-337.6" font-family="Arial" font-size="14.00">artifact_resource_link_id </text>
59
+ <text text-anchor="start" x="682.79" y="-337.6" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
60
+ <polygon fill="none" stroke="black" points="520.16,-294.6 520.16,-325.4 1004.93,-325.4 1004.93,-294.6 520.16,-294.6"/>
61
+ <text text-anchor="start" x="527.16" y="-306.8" font-family="Arial" font-size="14.00">artifact_instance_id </text>
62
+ <text text-anchor="start" x="651.67" y="-306.8" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
63
+ <polygon fill="none" stroke="black" points="520.16,-263.8 520.16,-294.6 1004.93,-294.6 1004.93,-263.8 520.16,-263.8"/>
64
+ <text text-anchor="start" x="527.16" y="-276" font-family="Arial" font-size="14.00">artifact_component_instance_id </text>
65
+ <text text-anchor="start" x="728.73" y="-276" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
66
+ </g>
67
+ <!-- artifact_resource_links&#45;&gt;artifact_instances -->
68
+ <g id="edge2" class="edge">
69
+ <title>artifact_resource_links:artifact_instance_id&#45;&gt;artifact_instances:artifact_instance_id</title>
70
+ <path fill="none" stroke="black" d="M1016,-308.88C1052.18,-299.75 1020.77,-237.03 1056.54,-205.2 1202.21,-75.58 1276.12,-61.6 1471.11,-61.6"/>
71
+ <polygon fill="black" stroke="black" points="1016.2,-308.86 1005.76,-305.49 1010.9,-309.45 1006.59,-309.93 1006.59,-309.93 1006.59,-309.93 1010.9,-309.45 1006.76,-314.44 1016.2,-308.86"/>
72
+ </g>
73
+ <!-- artifact_trace_links -->
74
+ <g id="node4" class="node">
75
+ <title>artifact_trace_links</title>
76
+ <polygon fill="#efefef" stroke="none" points="1108.98,-356.2 1108.98,-402.2 1564.1,-402.2 1564.1,-356.2 1108.98,-356.2"/>
77
+ <polygon fill="none" stroke="black" points="1108.98,-356.2 1108.98,-402.2 1564.1,-402.2 1564.1,-356.2 1108.98,-356.2"/>
78
+ <text text-anchor="start" x="1232.45" y="-380" font-family="Arial Bold" font-size="18.00">artifact_trace_links</text>
79
+ <text text-anchor="start" x="1371.38" y="-380" font-family="Arial" font-size="14.00">    </text>
80
+ <text text-anchor="start" x="1402.49" y="-380" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
81
+ <text text-anchor="start" x="1115.98" y="-365.6" font-family="Arial" font-size="14.00" fill="#333333">실제 산출물 instance와 방법론, 산출물 표준, 외부 실행 결과 간 trace를 관리한다.</text>
82
+ <polygon fill="none" stroke="black" points="1108.98,-325.4 1108.98,-356.2 1564.1,-356.2 1564.1,-325.4 1108.98,-325.4"/>
83
+ <text text-anchor="start" x="1115.98" y="-337.6" font-family="Arial" font-size="14.00">artifact_trace_link_id </text>
84
+ <text text-anchor="start" x="1248.27" y="-337.6" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
85
+ <polygon fill="none" stroke="black" points="1108.98,-294.6 1108.98,-325.4 1564.1,-325.4 1564.1,-294.6 1108.98,-294.6"/>
86
+ <text text-anchor="start" x="1115.98" y="-306.8" font-family="Arial" font-size="14.00">artifact_instance_id </text>
87
+ <text text-anchor="start" x="1240.5" y="-306.8" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
88
+ <polygon fill="none" stroke="black" points="1108.98,-263.8 1108.98,-294.6 1564.1,-294.6 1564.1,-263.8 1108.98,-263.8"/>
89
+ <text text-anchor="start" x="1115.98" y="-276" font-family="Arial" font-size="14.00">artifact_component_instance_id </text>
90
+ <text text-anchor="start" x="1317.55" y="-276" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
91
+ </g>
92
+ <!-- artifact_trace_links&#45;&gt;artifact_instances -->
93
+ <g id="edge3" class="edge">
94
+ <title>artifact_trace_links:artifact_instance_id&#45;&gt;artifact_instances:artifact_instance_id</title>
95
+ <path fill="none" stroke="black" d="M1575.41,-308.37C1600.69,-299 1582.34,-251.29 1564.1,-220.6 1540.17,-180.34 1496,-209.48 1472.11,-169.2 1447.72,-128.06 1423.29,-61.6 1471.11,-61.6"/>
96
+ <polygon fill="black" stroke="black" points="1575.31,-308.39 1564.73,-305.5 1570.04,-309.22 1565.76,-309.9 1565.76,-309.9 1565.76,-309.9 1570.04,-309.22 1566.13,-314.39 1575.31,-308.39"/>
97
+ </g>
98
+ <!-- artifact_validation_result_refs -->
99
+ <g id="node5" class="node">
100
+ <title>artifact_validation_result_refs</title>
101
+ <polygon fill="#efefef" stroke="none" points="1668.46,-356.2 1668.46,-402.2 1968.63,-402.2 1968.63,-356.2 1668.46,-356.2"/>
102
+ <polygon fill="none" stroke="black" points="1668.46,-356.2 1668.46,-402.2 1968.63,-402.2 1968.63,-356.2 1668.46,-356.2"/>
103
+ <text text-anchor="start" x="1675.46" y="-380" font-family="Arial Bold" font-size="18.00">artifact_validation_result_refs</text>
104
+ <text text-anchor="start" x="1892.37" y="-380" font-family="Arial" font-size="14.00">    </text>
105
+ <text text-anchor="start" x="1923.49" y="-380" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
106
+ <text text-anchor="start" x="1695.61" y="-365.6" font-family="Arial" font-size="14.00" fill="#333333">validation 실행 결과의 외부 참조를 관리한다.</text>
107
+ <polygon fill="none" stroke="black" points="1668.46,-325.4 1668.46,-356.2 1968.63,-356.2 1968.63,-325.4 1668.46,-325.4"/>
108
+ <text text-anchor="start" x="1675.46" y="-337.6" font-family="Arial" font-size="14.00">artifact_validation_result_ref_id </text>
109
+ <text text-anchor="start" x="1873.12" y="-337.6" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
110
+ <polygon fill="none" stroke="black" points="1668.46,-294.6 1668.46,-325.4 1968.63,-325.4 1968.63,-294.6 1668.46,-294.6"/>
111
+ <text text-anchor="start" x="1675.46" y="-306.8" font-family="Arial" font-size="14.00">artifact_instance_id </text>
112
+ <text text-anchor="start" x="1799.97" y="-306.8" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
113
+ <polygon fill="none" stroke="black" points="1668.46,-263.8 1668.46,-294.6 1968.63,-294.6 1968.63,-263.8 1668.46,-263.8"/>
114
+ <text text-anchor="start" x="1675.46" y="-276" font-family="Arial" font-size="14.00">artifact_component_instance_id </text>
115
+ <text text-anchor="start" x="1877.03" y="-276" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
116
+ </g>
117
+ <!-- artifact_validation_result_refs&#45;&gt;artifact_instances -->
118
+ <g id="edge4" class="edge">
119
+ <title>artifact_validation_result_refs:artifact_instance_id&#45;&gt;artifact_instances:artifact_instance_id</title>
120
+ <path fill="none" stroke="black" d="M1657.3,-309.15C1572.66,-293.31 1790.83,-61.6 1683.97,-61.6"/>
121
+ <polygon fill="black" stroke="black" points="1657.16,-309.14 1666.75,-314.46 1662.47,-309.58 1666.79,-309.94 1666.79,-309.94 1666.79,-309.94 1662.47,-309.58 1667.5,-305.49 1657.16,-309.14"/>
122
+ </g>
123
+ <!-- artifact_review_decision_refs -->
124
+ <g id="node6" class="node">
125
+ <title>artifact_review_decision_refs</title>
126
+ <polygon fill="#efefef" stroke="none" points="2072.86,-356.2 2072.86,-402.2 2492.22,-402.2 2492.22,-356.2 2072.86,-356.2"/>
127
+ <polygon fill="none" stroke="black" points="2072.86,-356.2 2072.86,-402.2 2492.22,-402.2 2492.22,-356.2 2072.86,-356.2"/>
128
+ <text text-anchor="start" x="2140.96" y="-380" font-family="Arial Bold" font-size="18.00">artifact_review_decision_refs</text>
129
+ <text text-anchor="start" x="2354.86" y="-380" font-family="Arial" font-size="14.00">    </text>
130
+ <text text-anchor="start" x="2385.98" y="-380" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
131
+ <text text-anchor="start" x="2079.86" y="-365.6" font-family="Arial" font-size="14.00" fill="#333333">산출물 instance 또는 component에 대한 검토 결정 외부 참조를 관리한다.</text>
132
+ <polygon fill="none" stroke="black" points="2072.86,-325.4 2072.86,-356.2 2492.22,-356.2 2492.22,-325.4 2072.86,-325.4"/>
133
+ <text text-anchor="start" x="2079.86" y="-337.6" font-family="Arial" font-size="14.00">artifact_review_decision_ref_id </text>
134
+ <text text-anchor="start" x="2275.96" y="-337.6" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
135
+ <polygon fill="none" stroke="black" points="2072.86,-294.6 2072.86,-325.4 2492.22,-325.4 2492.22,-294.6 2072.86,-294.6"/>
136
+ <text text-anchor="start" x="2079.86" y="-306.8" font-family="Arial" font-size="14.00">artifact_instance_id </text>
137
+ <text text-anchor="start" x="2204.38" y="-306.8" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
138
+ <polygon fill="none" stroke="black" points="2072.86,-263.8 2072.86,-294.6 2492.22,-294.6 2492.22,-263.8 2072.86,-263.8"/>
139
+ <text text-anchor="start" x="2079.86" y="-276" font-family="Arial" font-size="14.00">artifact_component_instance_id </text>
140
+ <text text-anchor="start" x="2281.43" y="-276" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
141
+ </g>
142
+ <!-- artifact_review_decision_refs&#45;&gt;artifact_instances -->
143
+ <g id="edge5" class="edge">
144
+ <title>artifact_review_decision_refs:artifact_instance_id&#45;&gt;artifact_instances:artifact_instance_id</title>
145
+ <path fill="none" stroke="black" d="M2061.73,-308.9C2025.25,-299.93 2055.36,-238.25 2020.54,-205.2 1902.59,-93.24 1846.6,-61.6 1683.97,-61.6"/>
146
+ <polygon fill="black" stroke="black" points="2061.59,-308.88 2071.04,-314.44 2066.89,-309.46 2071.2,-309.93 2071.2,-309.93 2071.2,-309.93 2066.89,-309.46 2072.02,-305.49 2061.59,-308.88"/>
147
+ </g>
148
+ <!-- artifact_status_events -->
149
+ <g id="node7" class="node">
150
+ <title>artifact_status_events</title>
151
+ <polygon fill="#efefef" stroke="none" points="2597.09,-371.6 2597.09,-417.6 2961.99,-417.6 2961.99,-371.6 2597.09,-371.6"/>
152
+ <polygon fill="none" stroke="black" points="2597.09,-371.6 2597.09,-417.6 2961.99,-417.6 2961.99,-371.6 2597.09,-371.6"/>
153
+ <text text-anchor="start" x="2666.94" y="-395.4" font-family="Arial Bold" font-size="18.00">artifact_status_events</text>
154
+ <text text-anchor="start" x="2822.89" y="-395.4" font-family="Arial" font-size="14.00">    </text>
155
+ <text text-anchor="start" x="2854" y="-395.4" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
156
+ <text text-anchor="start" x="2604.09" y="-381" font-family="Arial" font-size="14.00" fill="#333333">산출물 instance 또는 component의 상태 전이 이력을 관리한다.</text>
157
+ <polygon fill="none" stroke="black" points="2597.09,-340.8 2597.09,-371.6 2961.99,-371.6 2961.99,-340.8 2597.09,-340.8"/>
158
+ <text text-anchor="start" x="2604.09" y="-353" font-family="Arial" font-size="14.00">artifact_status_event_id </text>
159
+ <text text-anchor="start" x="2755.85" y="-353" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
160
+ <polygon fill="none" stroke="black" points="2597.09,-310 2597.09,-340.8 2961.99,-340.8 2961.99,-310 2597.09,-310"/>
161
+ <text text-anchor="start" x="2604.09" y="-322.2" font-family="Arial" font-size="14.00">artifact_instance_id </text>
162
+ <text text-anchor="start" x="2728.61" y="-322.2" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
163
+ <polygon fill="none" stroke="black" points="2597.09,-279.2 2597.09,-310 2961.99,-310 2961.99,-279.2 2597.09,-279.2"/>
164
+ <text text-anchor="start" x="2604.09" y="-291.4" font-family="Arial" font-size="14.00">artifact_component_instance_id </text>
165
+ <text text-anchor="start" x="2805.66" y="-291.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
166
+ <polygon fill="none" stroke="black" points="2597.09,-248.4 2597.09,-279.2 2961.99,-279.2 2961.99,-248.4 2597.09,-248.4"/>
167
+ <text text-anchor="start" x="2604.09" y="-260.6" font-family="Arial" font-size="14.00">artifact_review_decision_ref_id </text>
168
+ <text text-anchor="start" x="2800.19" y="-260.6" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
169
+ </g>
170
+ <!-- artifact_status_events&#45;&gt;artifact_instances -->
171
+ <g id="edge6" class="edge">
172
+ <title>artifact_status_events:artifact_instance_id&#45;&gt;artifact_instances:artifact_instance_id</title>
173
+ <path fill="none" stroke="black" d="M2585.91,-324.32C2544.48,-314.42 2587.23,-238.71 2544.54,-205.2 2392.03,-85.49 1877.85,-61.6 1683.97,-61.6"/>
174
+ <polygon fill="black" stroke="black" points="2585.81,-324.31 2595.28,-329.84 2591.12,-324.87 2595.42,-325.33 2595.42,-325.33 2595.42,-325.33 2591.12,-324.87 2596.23,-320.89 2585.81,-324.31"/>
175
+ </g>
176
+ </g>
177
+ </svg>
@@ -0,0 +1,89 @@
1
+ # artifact_resource_links
2
+
3
+ ## Description
4
+
5
+ 산출물 instance 또는 component instance와 document/file/resource를 연결한다.
6
+
7
+ <details>
8
+ <summary><strong>Table Definition</strong></summary>
9
+
10
+ ```sql
11
+ CREATE TABLE artifact_resource_links (
12
+ artifact_resource_link_id CHAR(36) PRIMARY KEY
13
+ CHECK (length(artifact_resource_link_id) = 36),
14
+ artifact_instance_id CHAR(36) NOT NULL
15
+ CHECK (length(artifact_instance_id) = 36),
16
+ artifact_component_instance_id CHAR(36)
17
+ CHECK (artifact_component_instance_id IS NULL OR length(artifact_component_instance_id) = 36),
18
+ resource_type_code VARCHAR(64) NOT NULL
19
+ CHECK (resource_type_code IN ('DOCUMENT_ID', 'FILE_PATH', 'URL', 'AGENT_RESOURCE_REF')),
20
+ resource_ref VARCHAR(1024) NOT NULL,
21
+ resource_role_code VARCHAR(64) NOT NULL DEFAULT 'CONTENT'
22
+ CHECK (resource_role_code IN ('CONTENT', 'RENDERED_OUTPUT', 'SOURCE', 'REFERENCE', 'ATTACHMENT')),
23
+ is_primary INTEGER NOT NULL DEFAULT 0
24
+ CHECK (is_primary IN (0, 1)),
25
+ created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
26
+ updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
27
+ metadata_json JSON
28
+ CHECK (metadata_json IS NULL OR json_valid(metadata_json)),
29
+
30
+ FOREIGN KEY (artifact_instance_id)
31
+ REFERENCES artifact_instances (artifact_instance_id)
32
+ ON DELETE CASCADE,
33
+
34
+ FOREIGN KEY (artifact_component_instance_id)
35
+ REFERENCES artifact_component_instances (artifact_component_instance_id)
36
+ ON DELETE CASCADE
37
+ )
38
+ ```
39
+
40
+ </details>
41
+
42
+ ## Columns
43
+
44
+ | Name | Type | Default | Nullable | Parents |
45
+ | ------------------------------ | ------------- | ----------------- | -------- | --------------------------------------------------------------- |
46
+ | artifact_resource_link_id | CHAR(36) | | true | |
47
+ | artifact_instance_id | CHAR(36) | | false | [artifact_instances](artifact_instances.md) |
48
+ | artifact_component_instance_id | CHAR(36) | | true | [artifact_component_instances](artifact_component_instances.md) |
49
+ | resource_type_code | VARCHAR(64) | | false | |
50
+ | resource_ref | VARCHAR(1024) | | false | |
51
+ | resource_role_code | VARCHAR(64) | 'CONTENT' | false | |
52
+ | is_primary | INTEGER | 0 | false | |
53
+ | created_at | DATETIME | CURRENT_TIMESTAMP | false | |
54
+ | updated_at | DATETIME | CURRENT_TIMESTAMP | false | |
55
+ | metadata_json | JSON | | true | |
56
+
57
+ ## Constraints
58
+
59
+ | Name | Type | Definition |
60
+ | ------------------------------------------ | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
61
+ | artifact_resource_link_id | PRIMARY KEY | PRIMARY KEY (artifact_resource_link_id) |
62
+ | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (artifact_component_instance_id) REFERENCES artifact_component_instances (artifact_component_instance_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
63
+ | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (artifact_instance_id) REFERENCES artifact_instances (artifact_instance_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
64
+ | sqlite_autoindex_artifact_resource_links_1 | PRIMARY KEY | PRIMARY KEY (artifact_resource_link_id) |
65
+ | - | CHECK | CHECK (length(artifact_resource_link_id) = 36) |
66
+ | - | CHECK | CHECK (length(artifact_instance_id) = 36) |
67
+ | - | CHECK | CHECK (artifact_component_instance_id IS NULL OR length(artifact_component_instance_id) = 36) |
68
+ | - | CHECK | CHECK (resource_type_code IN ('DOCUMENT_ID', 'FILE_PATH', 'URL', 'AGENT_RESOURCE_REF')) |
69
+ | - | CHECK | CHECK (resource_role_code IN ('CONTENT', 'RENDERED_OUTPUT', 'SOURCE', 'REFERENCE', 'ATTACHMENT')) |
70
+ | - | CHECK | CHECK (is_primary IN (0, 1)) |
71
+ | - | CHECK | CHECK (metadata_json IS NULL OR json_valid(metadata_json)) |
72
+
73
+ ## Indexes
74
+
75
+ | Name | Definition |
76
+ | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
77
+ | ux_artifact_resource_links_primary_component | CREATE UNIQUE INDEX ux_artifact_resource_links_primary_component<br /> ON artifact_resource_links (artifact_component_instance_id, resource_role_code)<br /> WHERE artifact_component_instance_id IS NOT NULL AND is_primary = 1 |
78
+ | ux_artifact_resource_links_primary_artifact | CREATE UNIQUE INDEX ux_artifact_resource_links_primary_artifact<br /> ON artifact_resource_links (artifact_instance_id, resource_role_code)<br /> WHERE artifact_component_instance_id IS NULL AND is_primary = 1 |
79
+ | idx_artifact_resource_links_component | CREATE INDEX idx_artifact_resource_links_component<br /> ON artifact_resource_links (artifact_component_instance_id) |
80
+ | idx_artifact_resource_links_artifact | CREATE INDEX idx_artifact_resource_links_artifact<br /> ON artifact_resource_links (artifact_instance_id) |
81
+ | sqlite_autoindex_artifact_resource_links_1 | PRIMARY KEY (artifact_resource_link_id) |
82
+
83
+ ## Relations
84
+
85
+ ![er](artifact_resource_links.svg)
86
+
87
+ ---
88
+
89
+ > Generated by [tbls](https://github.com/k1LoW/tbls)
@@ -0,0 +1,74 @@
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_resource_links Pages: 1 -->
7
+ <svg width="782pt" height="469pt"
8
+ viewBox="0.00 0.00 782.17 468.80" 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 464.8)">
10
+ <title>artifact_resource_links</title>
11
+ <polygon fill="white" stroke="none" points="-4,4 -4,-464.8 778.17,-464.8 778.17,4 -4,4"/>
12
+ <!-- artifact_resource_links -->
13
+ <g id="node1" class="node">
14
+ <title>artifact_resource_links</title>
15
+ <polygon fill="#efefef" stroke="none" points="104.25,-368.6 104.25,-414.6 589.02,-414.6 589.02,-368.6 104.25,-368.6"/>
16
+ <polygon fill="none" stroke="black" points="104.25,-368.6 104.25,-414.6 589.02,-414.6 589.02,-368.6 104.25,-368.6"/>
17
+ <text text-anchor="start" x="229.54" y="-392.4" font-family="Arial Bold" font-size="18.00">artifact_resource_links</text>
18
+ <text text-anchor="start" x="394.47" y="-392.4" font-family="Arial" font-size="14.00">    </text>
19
+ <text text-anchor="start" x="425.58" y="-392.4" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
20
+ <text text-anchor="start" x="111.25" y="-378" font-family="Arial" font-size="14.00" fill="#333333">산출물 instance 또는 component instance와 document/file/resource를 연결한다.</text>
21
+ <polygon fill="none" stroke="black" points="104.25,-337.8 104.25,-368.6 589.02,-368.6 589.02,-337.8 104.25,-337.8"/>
22
+ <text text-anchor="start" x="111.25" y="-350" font-family="Arial" font-size="14.00">artifact_resource_link_id </text>
23
+ <text text-anchor="start" x="266.88" y="-350" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
24
+ <polygon fill="none" stroke="black" points="104.25,-307 104.25,-337.8 589.02,-337.8 589.02,-307 104.25,-307"/>
25
+ <text text-anchor="start" x="111.25" y="-319.2" font-family="Arial" font-size="14.00">artifact_instance_id </text>
26
+ <text text-anchor="start" x="235.76" y="-319.2" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
27
+ <polygon fill="none" stroke="black" points="104.25,-276.2 104.25,-307 589.02,-307 589.02,-276.2 104.25,-276.2"/>
28
+ <text text-anchor="start" x="111.25" y="-288.4" font-family="Arial" font-size="14.00">artifact_component_instance_id </text>
29
+ <text text-anchor="start" x="312.82" y="-288.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
30
+ <polygon fill="none" stroke="black" stroke-width="3" points="102.75,-274.7 102.75,-416.1 590.52,-416.1 590.52,-274.7 102.75,-274.7"/>
31
+ </g>
32
+ <!-- artifact_instances -->
33
+ <g id="node2" class="node">
34
+ <title>artifact_instances</title>
35
+ <polygon fill="#efefef" stroke="none" points="43.2,-89.4 43.2,-135.4 254.06,-135.4 254.06,-89.4 43.2,-89.4"/>
36
+ <polygon fill="none" stroke="black" points="43.2,-89.4 43.2,-135.4 254.06,-135.4 254.06,-89.4 43.2,-89.4"/>
37
+ <text text-anchor="start" x="51.03" y="-113.2" font-family="Arial Bold" font-size="18.00">artifact_instances</text>
38
+ <text text-anchor="start" x="176.97" y="-113.2" font-family="Arial" font-size="14.00">    </text>
39
+ <text text-anchor="start" x="208.09" y="-113.2" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
40
+ <text text-anchor="start" x="56.43" y="-98.8" font-family="Arial" font-size="14.00" fill="#333333">실제 산출물 instance를 관리한다.</text>
41
+ <polygon fill="none" stroke="black" points="43.2,-58.6 43.2,-89.4 254.06,-89.4 254.06,-58.6 43.2,-58.6"/>
42
+ <text text-anchor="start" x="50.2" y="-70.8" font-family="Arial" font-size="14.00">artifact_instance_id </text>
43
+ <text text-anchor="start" x="174.72" y="-70.8" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
44
+ </g>
45
+ <!-- artifact_resource_links&#45;&gt;artifact_instances -->
46
+ <g id="edge1" class="edge">
47
+ <title>artifact_resource_links:artifact_instance_id&#45;&gt;artifact_instances:artifact_instance_id</title>
48
+ <path fill="none" stroke="black" d="M93.21,-320.91C65.61,-311.54 82.45,-260.17 104.25,-230 145.46,-172.94 212.88,-235.69 254.06,-178.6 281.26,-140.9 301.55,-74 255.06,-74"/>
49
+ <polygon fill="black" stroke="black" points="93.02,-320.88 102.25,-326.8 98.3,-321.67 102.58,-322.3 102.58,-322.3 102.58,-322.3 98.3,-321.67 103.57,-317.9 93.02,-320.88"/>
50
+ </g>
51
+ <!-- artifact_component_instances -->
52
+ <g id="node3" class="node">
53
+ <title>artifact_component_instances</title>
54
+ <polygon fill="#efefef" stroke="none" points="358.29,-104.8 358.29,-150.8 730.97,-150.8 730.97,-104.8 358.29,-104.8"/>
55
+ <polygon fill="none" stroke="black" points="358.29,-104.8 358.29,-150.8 730.97,-150.8 730.97,-104.8 358.29,-104.8"/>
56
+ <text text-anchor="start" x="402.54" y="-128.6" font-family="Arial Bold" font-size="18.00">artifact_component_instances</text>
57
+ <text text-anchor="start" x="617.46" y="-128.6" font-family="Arial" font-size="14.00">    </text>
58
+ <text text-anchor="start" x="648.58" y="-128.6" font-family="Arial" font-size="14.00" fill="#666666">[table]</text>
59
+ <text text-anchor="start" x="365.29" y="-114.2" font-family="Arial" font-size="14.00" fill="#333333">실제 산출물 안의 본문, 부록 등 component instance를 관리한다.</text>
60
+ <polygon fill="none" stroke="black" points="358.29,-74 358.29,-104.8 730.97,-104.8 730.97,-74 358.29,-74"/>
61
+ <text text-anchor="start" x="365.29" y="-86.2" font-family="Arial" font-size="14.00">artifact_component_instance_id </text>
62
+ <text text-anchor="start" x="566.86" y="-86.2" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
63
+ <polygon fill="none" stroke="black" points="358.29,-43.2 358.29,-74 730.97,-74 730.97,-43.2 358.29,-43.2"/>
64
+ <text text-anchor="start" x="365.29" y="-55.4" font-family="Arial" font-size="14.00">artifact_instance_id </text>
65
+ <text text-anchor="start" x="489.81" y="-55.4" font-family="Arial" font-size="14.00" fill="#666666">[CHAR(36)]</text>
66
+ </g>
67
+ <!-- artifact_resource_links&#45;&gt;artifact_component_instances -->
68
+ <g id="edge2" class="edge">
69
+ <title>artifact_resource_links:artifact_component_instance_id&#45;&gt;artifact_component_instances:artifact_component_instance_id</title>
70
+ <path fill="none" stroke="black" d="M599.81,-289.09C614.14,-279.89 604.32,-247.59 589.02,-230 520.88,-151.71 426.16,-272.52 358.29,-194 327.89,-158.83 310.8,-89.4 357.29,-89.4"/>
71
+ <polygon fill="black" stroke="black" points="600.03,-289.04 589.22,-287.16 594.86,-290.36 590.66,-291.43 590.66,-291.43 590.66,-291.43 594.86,-290.36 591.46,-295.88 600.03,-289.04"/>
72
+ </g>
73
+ </g>
74
+ </svg>
@@ -0,0 +1,89 @@
1
+ # artifact_review_decision_refs
2
+
3
+ ## Description
4
+
5
+ 산출물 instance 또는 component에 대한 검토 결정 외부 참조를 관리한다.
6
+
7
+ <details>
8
+ <summary><strong>Table Definition</strong></summary>
9
+
10
+ ```sql
11
+ CREATE TABLE artifact_review_decision_refs (
12
+ artifact_review_decision_ref_id CHAR(36) PRIMARY KEY
13
+ CHECK (length(artifact_review_decision_ref_id) = 36),
14
+ artifact_instance_id CHAR(36) NOT NULL
15
+ CHECK (length(artifact_instance_id) = 36),
16
+ artifact_component_instance_id CHAR(36)
17
+ CHECK (artifact_component_instance_id IS NULL OR length(artifact_component_instance_id) = 36),
18
+ review_scope_code VARCHAR(64) NOT NULL
19
+ CHECK (review_scope_code IN ('artifact_instance', 'artifact_component', 'stage', 'activity')),
20
+ decision_code VARCHAR(64) NOT NULL
21
+ CHECK (decision_code IN ('approved', 'changes_requested', 'rejected', 'deferred')),
22
+ reviewer_ref VARCHAR(256),
23
+ decision_reason TEXT,
24
+ decision_result_ref VARCHAR(1024) NOT NULL,
25
+ decided_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
26
+ created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
27
+ updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
28
+ metadata_json JSON
29
+ CHECK (metadata_json IS NULL OR json_valid(metadata_json)),
30
+
31
+ FOREIGN KEY (artifact_instance_id)
32
+ REFERENCES artifact_instances (artifact_instance_id)
33
+ ON DELETE CASCADE,
34
+
35
+ FOREIGN KEY (artifact_component_instance_id)
36
+ REFERENCES artifact_component_instances (artifact_component_instance_id)
37
+ ON DELETE CASCADE
38
+ )
39
+ ```
40
+
41
+ </details>
42
+
43
+ ## Columns
44
+
45
+ | Name | Type | Default | Nullable | Children | Parents |
46
+ | ------------------------------- | ------------- | ----------------- | -------- | --------------------------------------------------- | --------------------------------------------------------------- |
47
+ | artifact_review_decision_ref_id | CHAR(36) | | true | [artifact_status_events](artifact_status_events.md) | |
48
+ | artifact_instance_id | CHAR(36) | | false | | [artifact_instances](artifact_instances.md) |
49
+ | artifact_component_instance_id | CHAR(36) | | true | | [artifact_component_instances](artifact_component_instances.md) |
50
+ | review_scope_code | VARCHAR(64) | | false | | |
51
+ | decision_code | VARCHAR(64) | | false | | |
52
+ | reviewer_ref | VARCHAR(256) | | true | | |
53
+ | decision_reason | TEXT | | true | | |
54
+ | decision_result_ref | VARCHAR(1024) | | false | | |
55
+ | decided_at | DATETIME | CURRENT_TIMESTAMP | false | | |
56
+ | created_at | DATETIME | CURRENT_TIMESTAMP | false | | |
57
+ | updated_at | DATETIME | CURRENT_TIMESTAMP | false | | |
58
+ | metadata_json | JSON | | true | | |
59
+
60
+ ## Constraints
61
+
62
+ | Name | Type | Definition |
63
+ | ------------------------------------------------ | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
64
+ | artifact_review_decision_ref_id | PRIMARY KEY | PRIMARY KEY (artifact_review_decision_ref_id) |
65
+ | - (Foreign key ID: 0) | FOREIGN KEY | FOREIGN KEY (artifact_component_instance_id) REFERENCES artifact_component_instances (artifact_component_instance_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
66
+ | - (Foreign key ID: 1) | FOREIGN KEY | FOREIGN KEY (artifact_instance_id) REFERENCES artifact_instances (artifact_instance_id) ON UPDATE NO ACTION ON DELETE CASCADE MATCH NONE |
67
+ | sqlite_autoindex_artifact_review_decision_refs_1 | PRIMARY KEY | PRIMARY KEY (artifact_review_decision_ref_id) |
68
+ | - | CHECK | CHECK (length(artifact_review_decision_ref_id) = 36) |
69
+ | - | CHECK | CHECK (length(artifact_instance_id) = 36) |
70
+ | - | CHECK | CHECK (artifact_component_instance_id IS NULL OR length(artifact_component_instance_id) = 36) |
71
+ | - | CHECK | CHECK (review_scope_code IN ('artifact_instance', 'artifact_component', 'stage', 'activity')) |
72
+ | - | CHECK | CHECK (decision_code IN ('approved', 'changes_requested', 'rejected', 'deferred')) |
73
+ | - | CHECK | CHECK (metadata_json IS NULL OR json_valid(metadata_json)) |
74
+
75
+ ## Indexes
76
+
77
+ | Name | Definition |
78
+ | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
79
+ | idx_artifact_review_decision_refs_component | CREATE INDEX idx_artifact_review_decision_refs_component<br /> ON artifact_review_decision_refs (artifact_component_instance_id, decision_code, decided_at) |
80
+ | idx_artifact_review_decision_refs_artifact | CREATE INDEX idx_artifact_review_decision_refs_artifact<br /> ON artifact_review_decision_refs (artifact_instance_id, decision_code, decided_at) |
81
+ | sqlite_autoindex_artifact_review_decision_refs_1 | PRIMARY KEY (artifact_review_decision_ref_id) |
82
+
83
+ ## Relations
84
+
85
+ ![er](artifact_review_decision_refs.svg)
86
+
87
+ ---
88
+
89
+ > Generated by [tbls](https://github.com/k1LoW/tbls)