@things-factory/ops-master 10.1.33 → 10.1.35

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 (150) hide show
  1. package/dist-client/index.d.ts +1 -0
  2. package/dist-client/index.js +1 -0
  3. package/dist-client/index.js.map +1 -1
  4. package/dist-client/master-change-approval.d.ts +14 -0
  5. package/dist-client/master-change-approval.js +36 -0
  6. package/dist-client/master-change-approval.js.map +1 -0
  7. package/dist-client/pages/master/material-definition.d.ts +4 -11
  8. package/dist-client/pages/master/material-definition.js +5 -53
  9. package/dist-client/pages/master/material-definition.js.map +1 -1
  10. package/dist-client/pages/master/material-revision-fields.d.ts +2 -0
  11. package/dist-client/pages/master/material-revision-fields.js +43 -0
  12. package/dist-client/pages/master/material-revision-fields.js.map +1 -0
  13. package/dist-client/pages/master/recipe-definition.d.ts +4 -135
  14. package/dist-client/pages/master/recipe-definition.js +7 -397
  15. package/dist-client/pages/master/recipe-definition.js.map +1 -1
  16. package/dist-client/pages/master/revision-comparison.d.ts +48 -0
  17. package/dist-client/pages/master/revision-comparison.js +553 -0
  18. package/dist-client/pages/master/revision-comparison.js.map +1 -0
  19. package/dist-client/pages/master/revision-view.d.ts +19 -0
  20. package/dist-client/pages/master/revision-view.js +133 -0
  21. package/dist-client/pages/master/revision-view.js.map +1 -0
  22. package/dist-client/pages/master/revision-workspace.d.ts +50 -0
  23. package/dist-client/pages/master/revision-workspace.js +752 -0
  24. package/dist-client/pages/master/revision-workspace.js.map +1 -0
  25. package/dist-client/pages/master/test-specification.d.ts +4 -92
  26. package/dist-client/pages/master/test-specification.js +5 -440
  27. package/dist-client/pages/master/test-specification.js.map +1 -1
  28. package/dist-client/tsconfig.tsbuildinfo +1 -1
  29. package/dist-server/service/asset/asset-master-resolver.js +38 -34
  30. package/dist-server/service/asset/asset-master-resolver.js.map +1 -1
  31. package/dist-server/service/asset/index.d.ts +2 -2
  32. package/dist-server/service/equipment/equipment-master-resolver.js +54 -49
  33. package/dist-server/service/equipment/equipment-master-resolver.js.map +1 -1
  34. package/dist-server/service/equipment/index.d.ts +2 -2
  35. package/dist-server/service/index.d.ts +18 -2
  36. package/dist-server/service/index.js +18 -0
  37. package/dist-server/service/index.js.map +1 -1
  38. package/dist-server/service/location/index.d.ts +1 -1
  39. package/dist-server/service/location/location-master-resolver.js +34 -31
  40. package/dist-server/service/location/location-master-resolver.js.map +1 -1
  41. package/dist-server/service/master-axis.js +1 -1
  42. package/dist-server/service/master-axis.js.map +1 -1
  43. package/dist-server/service/master-change-policy.d.ts +23 -0
  44. package/dist-server/service/master-change-policy.js +134 -0
  45. package/dist-server/service/master-change-policy.js.map +1 -0
  46. package/dist-server/service/master-conformance-resolver.js +11 -1
  47. package/dist-server/service/master-conformance-resolver.js.map +1 -1
  48. package/dist-server/service/master-crud.js +9 -0
  49. package/dist-server/service/master-crud.js.map +1 -1
  50. package/dist-server/service/master-list.js +6 -0
  51. package/dist-server/service/master-list.js.map +1 -1
  52. package/dist-server/service/material/index.d.ts +3 -2
  53. package/dist-server/service/material/index.js +4 -2
  54. package/dist-server/service/material/index.js.map +1 -1
  55. package/dist-server/service/material/material-axis-status.d.ts +8 -0
  56. package/dist-server/service/material/material-axis-status.js +19 -0
  57. package/dist-server/service/material/material-axis-status.js.map +1 -0
  58. package/dist-server/service/material/material-definition.d.ts +3 -0
  59. package/dist-server/service/material/material-definition.js +13 -0
  60. package/dist-server/service/material/material-definition.js.map +1 -1
  61. package/dist-server/service/material/material-effective-list.d.ts +39 -0
  62. package/dist-server/service/material/material-effective-list.js +54 -0
  63. package/dist-server/service/material/material-effective-list.js.map +1 -0
  64. package/dist-server/service/material/material-master-resolver.js +59 -61
  65. package/dist-server/service/material/material-master-resolver.js.map +1 -1
  66. package/dist-server/service/material/material-query.js +9 -2
  67. package/dist-server/service/material/material-query.js.map +1 -1
  68. package/dist-server/service/material/material-revision-content.d.ts +10 -0
  69. package/dist-server/service/material/material-revision-content.js +92 -0
  70. package/dist-server/service/material/material-revision-content.js.map +1 -0
  71. package/dist-server/service/material/material-revision-resolver.d.ts +54 -0
  72. package/dist-server/service/material/material-revision-resolver.js +76 -0
  73. package/dist-server/service/material/material-revision-resolver.js.map +1 -0
  74. package/dist-server/service/material/material-revision-service.d.ts +144 -0
  75. package/dist-server/service/material/material-revision-service.js +534 -0
  76. package/dist-server/service/material/material-revision-service.js.map +1 -0
  77. package/dist-server/service/material/material-revision.d.ts +84 -0
  78. package/dist-server/service/material/material-revision.js +339 -0
  79. package/dist-server/service/material/material-revision.js.map +1 -0
  80. package/dist-server/service/operation/index.d.ts +1 -1
  81. package/dist-server/service/operation/operation-definition.js +1 -0
  82. package/dist-server/service/operation/operation-definition.js.map +1 -1
  83. package/dist-server/service/operation/operation-master-resolver.js +30 -30
  84. package/dist-server/service/operation/operation-master-resolver.js.map +1 -1
  85. package/dist-server/service/personnel/index.d.ts +2 -2
  86. package/dist-server/service/personnel/personnel-master-resolver.js +38 -34
  87. package/dist-server/service/personnel/personnel-master-resolver.js.map +1 -1
  88. package/dist-server/service/quality/nonconformance-cause-resolver.js +17 -14
  89. package/dist-server/service/quality/nonconformance-cause-resolver.js.map +1 -1
  90. package/dist-server/service/recipe/index.d.ts +3 -2
  91. package/dist-server/service/recipe/index.js +4 -2
  92. package/dist-server/service/recipe/index.js.map +1 -1
  93. package/dist-server/service/recipe/recipe-definition.d.ts +4 -0
  94. package/dist-server/service/recipe/recipe-definition.js +14 -1
  95. package/dist-server/service/recipe/recipe-definition.js.map +1 -1
  96. package/dist-server/service/recipe/recipe-effective-list.d.ts +49 -0
  97. package/dist-server/service/recipe/recipe-effective-list.js +96 -0
  98. package/dist-server/service/recipe/recipe-effective-list.js.map +1 -0
  99. package/dist-server/service/recipe/recipe-master-resolver.js +32 -28
  100. package/dist-server/service/recipe/recipe-master-resolver.js.map +1 -1
  101. package/dist-server/service/recipe/recipe-query.js +9 -2
  102. package/dist-server/service/recipe/recipe-query.js.map +1 -1
  103. package/dist-server/service/recipe/recipe-revision-content.d.ts +32 -0
  104. package/dist-server/service/recipe/recipe-revision-content.js +65 -0
  105. package/dist-server/service/recipe/recipe-revision-content.js.map +1 -0
  106. package/dist-server/service/recipe/recipe-revision-line.d.ts +30 -0
  107. package/dist-server/service/recipe/recipe-revision-line.js +95 -0
  108. package/dist-server/service/recipe/recipe-revision-line.js.map +1 -0
  109. package/dist-server/service/recipe/recipe-revision-resolver.d.ts +59 -0
  110. package/dist-server/service/recipe/recipe-revision-resolver.js +76 -0
  111. package/dist-server/service/recipe/recipe-revision-resolver.js.map +1 -0
  112. package/dist-server/service/recipe/recipe-revision-service.d.ts +147 -0
  113. package/dist-server/service/recipe/recipe-revision-service.js +591 -0
  114. package/dist-server/service/recipe/recipe-revision-service.js.map +1 -0
  115. package/dist-server/service/recipe/recipe-revision.d.ts +100 -0
  116. package/dist-server/service/recipe/recipe-revision.js +373 -0
  117. package/dist-server/service/recipe/recipe-revision.js.map +1 -0
  118. package/dist-server/service/recipe/route-definition.js +1 -0
  119. package/dist-server/service/recipe/route-definition.js.map +1 -1
  120. package/dist-server/service/resource/class-members.js +9 -0
  121. package/dist-server/service/resource/class-members.js.map +1 -1
  122. package/dist-server/service/status/master-status.js +2 -1
  123. package/dist-server/service/status/master-status.js.map +1 -1
  124. package/dist-server/service/test-spec/index.d.ts +3 -2
  125. package/dist-server/service/test-spec/index.js +4 -2
  126. package/dist-server/service/test-spec/index.js.map +1 -1
  127. package/dist-server/service/test-spec/test-spec-effective-list.d.ts +34 -0
  128. package/dist-server/service/test-spec/test-spec-effective-list.js +42 -0
  129. package/dist-server/service/test-spec/test-spec-effective-list.js.map +1 -0
  130. package/dist-server/service/test-spec/test-spec-master-resolver.d.ts +4 -14
  131. package/dist-server/service/test-spec/test-spec-master-resolver.js +12 -83
  132. package/dist-server/service/test-spec/test-spec-master-resolver.js.map +1 -1
  133. package/dist-server/service/test-spec/test-spec-query.js +7 -1
  134. package/dist-server/service/test-spec/test-spec-query.js.map +1 -1
  135. package/dist-server/service/test-spec/test-spec-revision-resolver.d.ts +53 -0
  136. package/dist-server/service/test-spec/test-spec-revision-resolver.js +76 -0
  137. package/dist-server/service/test-spec/test-spec-revision-resolver.js.map +1 -0
  138. package/dist-server/service/test-spec/test-spec-revision-service.d.ts +138 -0
  139. package/dist-server/service/test-spec/test-spec-revision-service.js +538 -0
  140. package/dist-server/service/test-spec/test-spec-revision-service.js.map +1 -0
  141. package/dist-server/service/test-spec/test-spec-revision.d.ts +84 -0
  142. package/dist-server/service/test-spec/test-spec-revision.js +334 -0
  143. package/dist-server/service/test-spec/test-spec-revision.js.map +1 -0
  144. package/dist-server/service/test-spec/test-specification.d.ts +6 -0
  145. package/dist-server/service/test-spec/test-specification.js +15 -2
  146. package/dist-server/service/test-spec/test-specification.js.map +1 -1
  147. package/dist-server/tsconfig.tsbuildinfo +1 -1
  148. package/package.json +10 -6
  149. package/translations/en.json +148 -0
  150. package/translations/ko.json +148 -0
@@ -0,0 +1,84 @@
1
+ import { Domain } from '@things-factory/shell';
2
+ import { User } from '@things-factory/auth-base';
3
+ import type { TestSpecification } from './test-specification';
4
+ import { MasterChangePolicy } from '../master-change-policy';
5
+ import type { TestSpecificationCriterion } from '@operato/ops-contract';
6
+ /** Content and the proposed effective date freeze together. Worklist owns the decision. */
7
+ export declare class TestSpecificationRevision {
8
+ /** Human revision number within one identity; assigned once under the subject write lock. */
9
+ revisionNumber: number;
10
+ policy: MasterChangePolicy;
11
+ policyId: string;
12
+ id: string;
13
+ domain: Domain;
14
+ domainId: string;
15
+ spec: TestSpecification;
16
+ specId: string;
17
+ baseRevision: TestSpecificationRevision | null;
18
+ baseRevisionId: string | null;
19
+ baseGeneration: number;
20
+ editGeneration: number;
21
+ version: string;
22
+ description: string | null;
23
+ criteria: TestSpecificationCriterion[];
24
+ effectiveFrom: Date;
25
+ reason: string;
26
+ creator: User;
27
+ creatorId: string;
28
+ createdAt: Date;
29
+ frozenAt: Date | null;
30
+ contentHash: string | null;
31
+ /** Opaque product decision ID: the common master module does not depend on worklist. */
32
+ activityInstanceId: string | null;
33
+ }
34
+ /** An append-only generation of the complete schedule for one specification. */
35
+ export declare class TestSpecificationPlan {
36
+ policy: MasterChangePolicy;
37
+ policyId: string;
38
+ publishedRevision: TestSpecificationRevision;
39
+ publishedRevisionId: string;
40
+ releaseKind: 'approved' | 'policy';
41
+ publisher: User;
42
+ publisherId: string;
43
+ id: string;
44
+ domain: Domain;
45
+ domainId: string;
46
+ spec: TestSpecification;
47
+ specId: string;
48
+ generation: number;
49
+ recordedAt: Date;
50
+ activityInstanceId: string | null;
51
+ approver: User;
52
+ approverId: string;
53
+ submissionHash: string;
54
+ }
55
+ export declare class TestSpecificationSegment {
56
+ id: string;
57
+ domain: Domain;
58
+ domainId: string;
59
+ spec: TestSpecification;
60
+ specId: string;
61
+ plan: TestSpecificationPlan;
62
+ planId: string;
63
+ revision: TestSpecificationRevision;
64
+ revisionId: string;
65
+ validFrom: Date;
66
+ validTo: Date | null;
67
+ }
68
+ /** Permanent evidence of the selected revision, also the retroactivity interlock. */
69
+ export declare class TestSpecificationBasis {
70
+ id: string;
71
+ domain: Domain;
72
+ domainId: string;
73
+ spec: TestSpecification;
74
+ specId: string;
75
+ recordKey: string;
76
+ revision: TestSpecificationRevision;
77
+ revisionId: string;
78
+ plan: TestSpecificationPlan;
79
+ planId: string;
80
+ contentHash: string;
81
+ businessTime: Date;
82
+ resolvedAt: Date;
83
+ }
84
+ export declare const TEST_SPEC_REVISION_ENTITIES: (typeof TestSpecificationRevision | typeof TestSpecificationPlan | typeof TestSpecificationSegment | typeof TestSpecificationBasis)[];
@@ -0,0 +1,334 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TEST_SPEC_REVISION_ENTITIES = exports.TestSpecificationBasis = exports.TestSpecificationSegment = exports.TestSpecificationPlan = exports.TestSpecificationRevision = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const typeorm_1 = require("typeorm");
6
+ const shell_1 = require("@things-factory/shell");
7
+ const auth_base_1 = require("@things-factory/auth-base");
8
+ const master_change_policy_1 = require("../master-change-policy");
9
+ // Relations own the columns and RelationId exposes read-only identifiers.
10
+ // Where a composite FK is declared, disable only the redundant single-column FK;
11
+ // the database still enforces existence, domain and specification together.
12
+ /** Content and the proposed effective date freeze together. Worklist owns the decision. */
13
+ let TestSpecificationRevision = class TestSpecificationRevision {
14
+ };
15
+ exports.TestSpecificationRevision = TestSpecificationRevision;
16
+ tslib_1.__decorate([
17
+ (0, typeorm_1.Column)('int'),
18
+ tslib_1.__metadata("design:type", Number)
19
+ ], TestSpecificationRevision.prototype, "revisionNumber", void 0);
20
+ tslib_1.__decorate([
21
+ (0, typeorm_1.ManyToOne)(() => master_change_policy_1.MasterChangePolicy, { nullable: false, createForeignKeyConstraints: false }),
22
+ tslib_1.__metadata("design:type", master_change_policy_1.MasterChangePolicy)
23
+ ], TestSpecificationRevision.prototype, "policy", void 0);
24
+ tslib_1.__decorate([
25
+ (0, typeorm_1.RelationId)((row) => row.policy),
26
+ tslib_1.__metadata("design:type", String)
27
+ ], TestSpecificationRevision.prototype, "policyId", void 0);
28
+ tslib_1.__decorate([
29
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
30
+ tslib_1.__metadata("design:type", String)
31
+ ], TestSpecificationRevision.prototype, "id", void 0);
32
+ tslib_1.__decorate([
33
+ (0, typeorm_1.ManyToOne)(() => shell_1.Domain, { nullable: false }),
34
+ tslib_1.__metadata("design:type", shell_1.Domain)
35
+ ], TestSpecificationRevision.prototype, "domain", void 0);
36
+ tslib_1.__decorate([
37
+ (0, typeorm_1.RelationId)((row) => row.domain),
38
+ tslib_1.__metadata("design:type", String)
39
+ ], TestSpecificationRevision.prototype, "domainId", void 0);
40
+ tslib_1.__decorate([
41
+ (0, typeorm_1.ManyToOne)('TestSpecification', { nullable: false, createForeignKeyConstraints: false }),
42
+ tslib_1.__metadata("design:type", Function)
43
+ ], TestSpecificationRevision.prototype, "spec", void 0);
44
+ tslib_1.__decorate([
45
+ (0, typeorm_1.RelationId)((row) => row.spec),
46
+ tslib_1.__metadata("design:type", String)
47
+ ], TestSpecificationRevision.prototype, "specId", void 0);
48
+ tslib_1.__decorate([
49
+ (0, typeorm_1.ManyToOne)(() => TestSpecificationRevision, { nullable: true, createForeignKeyConstraints: false }),
50
+ tslib_1.__metadata("design:type", TestSpecificationRevision)
51
+ ], TestSpecificationRevision.prototype, "baseRevision", void 0);
52
+ tslib_1.__decorate([
53
+ (0, typeorm_1.RelationId)((row) => row.baseRevision),
54
+ tslib_1.__metadata("design:type", String)
55
+ ], TestSpecificationRevision.prototype, "baseRevisionId", void 0);
56
+ tslib_1.__decorate([
57
+ (0, typeorm_1.Column)('int'),
58
+ tslib_1.__metadata("design:type", Number)
59
+ ], TestSpecificationRevision.prototype, "baseGeneration", void 0);
60
+ tslib_1.__decorate([
61
+ (0, typeorm_1.Column)('int', { default: 0 }),
62
+ tslib_1.__metadata("design:type", Number)
63
+ ], TestSpecificationRevision.prototype, "editGeneration", void 0);
64
+ tslib_1.__decorate([
65
+ (0, typeorm_1.Column)('varchar'),
66
+ tslib_1.__metadata("design:type", String)
67
+ ], TestSpecificationRevision.prototype, "version", void 0);
68
+ tslib_1.__decorate([
69
+ (0, typeorm_1.Column)('text', { nullable: true }),
70
+ tslib_1.__metadata("design:type", String)
71
+ ], TestSpecificationRevision.prototype, "description", void 0);
72
+ tslib_1.__decorate([
73
+ (0, typeorm_1.Column)('simple-json'),
74
+ tslib_1.__metadata("design:type", Array)
75
+ ], TestSpecificationRevision.prototype, "criteria", void 0);
76
+ tslib_1.__decorate([
77
+ (0, typeorm_1.Column)({ type: Date }),
78
+ tslib_1.__metadata("design:type", Date)
79
+ ], TestSpecificationRevision.prototype, "effectiveFrom", void 0);
80
+ tslib_1.__decorate([
81
+ (0, typeorm_1.Column)('text'),
82
+ tslib_1.__metadata("design:type", String)
83
+ ], TestSpecificationRevision.prototype, "reason", void 0);
84
+ tslib_1.__decorate([
85
+ (0, typeorm_1.ManyToOne)(() => auth_base_1.User, { nullable: false }),
86
+ tslib_1.__metadata("design:type", auth_base_1.User)
87
+ ], TestSpecificationRevision.prototype, "creator", void 0);
88
+ tslib_1.__decorate([
89
+ (0, typeorm_1.RelationId)((row) => row.creator),
90
+ tslib_1.__metadata("design:type", String)
91
+ ], TestSpecificationRevision.prototype, "creatorId", void 0);
92
+ tslib_1.__decorate([
93
+ (0, typeorm_1.Column)({ type: Date }),
94
+ tslib_1.__metadata("design:type", Date)
95
+ ], TestSpecificationRevision.prototype, "createdAt", void 0);
96
+ tslib_1.__decorate([
97
+ (0, typeorm_1.Column)({ type: Date, nullable: true }),
98
+ tslib_1.__metadata("design:type", Date)
99
+ ], TestSpecificationRevision.prototype, "frozenAt", void 0);
100
+ tslib_1.__decorate([
101
+ (0, typeorm_1.Column)('varchar', { nullable: true }),
102
+ tslib_1.__metadata("design:type", String)
103
+ ], TestSpecificationRevision.prototype, "contentHash", void 0);
104
+ tslib_1.__decorate([
105
+ (0, typeorm_1.Column)('varchar', { nullable: true }),
106
+ tslib_1.__metadata("design:type", String)
107
+ ], TestSpecificationRevision.prototype, "activityInstanceId", void 0);
108
+ exports.TestSpecificationRevision = TestSpecificationRevision = tslib_1.__decorate([
109
+ (0, typeorm_1.Entity)('ops_test_spec_revision'),
110
+ (0, typeorm_1.Index)('ix_test_spec_revision_subject', ['domain', 'spec', 'id'], { unique: true }),
111
+ (0, typeorm_1.Index)('ix_test_spec_revision_list', ['domain', 'spec', 'createdAt']),
112
+ (0, typeorm_1.ForeignKey)(() => master_change_policy_1.MasterChangePolicy, ['domain', 'policy'], ['domain', 'id'], { onDelete: 'RESTRICT' }),
113
+ (0, typeorm_1.ForeignKey)('TestSpecification', ['domain', 'spec'], ['domain', 'id'], { onDelete: 'RESTRICT' }),
114
+ (0, typeorm_1.ForeignKey)('TestSpecificationRevision', ['domain', 'spec', 'baseRevision'], ['domain', 'spec', 'id'], {
115
+ onDelete: 'RESTRICT'
116
+ }),
117
+ (0, typeorm_1.Index)('ix_spec_revision_number', ['domain', 'spec', 'revisionNumber'], { unique: true })
118
+ ], TestSpecificationRevision);
119
+ /** An append-only generation of the complete schedule for one specification. */
120
+ let TestSpecificationPlan = class TestSpecificationPlan {
121
+ };
122
+ exports.TestSpecificationPlan = TestSpecificationPlan;
123
+ tslib_1.__decorate([
124
+ (0, typeorm_1.ManyToOne)(() => master_change_policy_1.MasterChangePolicy, { nullable: false, createForeignKeyConstraints: false }),
125
+ tslib_1.__metadata("design:type", master_change_policy_1.MasterChangePolicy)
126
+ ], TestSpecificationPlan.prototype, "policy", void 0);
127
+ tslib_1.__decorate([
128
+ (0, typeorm_1.RelationId)((row) => row.policy),
129
+ tslib_1.__metadata("design:type", String)
130
+ ], TestSpecificationPlan.prototype, "policyId", void 0);
131
+ tslib_1.__decorate([
132
+ (0, typeorm_1.ManyToOne)(() => TestSpecificationRevision, { nullable: false, createForeignKeyConstraints: false }),
133
+ tslib_1.__metadata("design:type", TestSpecificationRevision)
134
+ ], TestSpecificationPlan.prototype, "publishedRevision", void 0);
135
+ tslib_1.__decorate([
136
+ (0, typeorm_1.RelationId)((row) => row.publishedRevision),
137
+ tslib_1.__metadata("design:type", String)
138
+ ], TestSpecificationPlan.prototype, "publishedRevisionId", void 0);
139
+ tslib_1.__decorate([
140
+ (0, typeorm_1.Column)('varchar'),
141
+ tslib_1.__metadata("design:type", String)
142
+ ], TestSpecificationPlan.prototype, "releaseKind", void 0);
143
+ tslib_1.__decorate([
144
+ (0, typeorm_1.ManyToOne)(() => auth_base_1.User, { nullable: false }),
145
+ tslib_1.__metadata("design:type", auth_base_1.User)
146
+ ], TestSpecificationPlan.prototype, "publisher", void 0);
147
+ tslib_1.__decorate([
148
+ (0, typeorm_1.RelationId)((row) => row.publisher),
149
+ tslib_1.__metadata("design:type", String)
150
+ ], TestSpecificationPlan.prototype, "publisherId", void 0);
151
+ tslib_1.__decorate([
152
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
153
+ tslib_1.__metadata("design:type", String)
154
+ ], TestSpecificationPlan.prototype, "id", void 0);
155
+ tslib_1.__decorate([
156
+ (0, typeorm_1.ManyToOne)(() => shell_1.Domain, { nullable: false }),
157
+ tslib_1.__metadata("design:type", shell_1.Domain)
158
+ ], TestSpecificationPlan.prototype, "domain", void 0);
159
+ tslib_1.__decorate([
160
+ (0, typeorm_1.RelationId)((row) => row.domain),
161
+ tslib_1.__metadata("design:type", String)
162
+ ], TestSpecificationPlan.prototype, "domainId", void 0);
163
+ tslib_1.__decorate([
164
+ (0, typeorm_1.ManyToOne)('TestSpecification', { nullable: false, createForeignKeyConstraints: false }),
165
+ tslib_1.__metadata("design:type", Function)
166
+ ], TestSpecificationPlan.prototype, "spec", void 0);
167
+ tslib_1.__decorate([
168
+ (0, typeorm_1.RelationId)((row) => row.spec),
169
+ tslib_1.__metadata("design:type", String)
170
+ ], TestSpecificationPlan.prototype, "specId", void 0);
171
+ tslib_1.__decorate([
172
+ (0, typeorm_1.Column)('int'),
173
+ tslib_1.__metadata("design:type", Number)
174
+ ], TestSpecificationPlan.prototype, "generation", void 0);
175
+ tslib_1.__decorate([
176
+ (0, typeorm_1.Column)({ type: Date }),
177
+ tslib_1.__metadata("design:type", Date)
178
+ ], TestSpecificationPlan.prototype, "recordedAt", void 0);
179
+ tslib_1.__decorate([
180
+ (0, typeorm_1.Column)('varchar', { nullable: true }),
181
+ tslib_1.__metadata("design:type", String)
182
+ ], TestSpecificationPlan.prototype, "activityInstanceId", void 0);
183
+ tslib_1.__decorate([
184
+ (0, typeorm_1.ManyToOne)(() => auth_base_1.User, { nullable: true }),
185
+ tslib_1.__metadata("design:type", auth_base_1.User)
186
+ ], TestSpecificationPlan.prototype, "approver", void 0);
187
+ tslib_1.__decorate([
188
+ (0, typeorm_1.RelationId)((row) => row.approver),
189
+ tslib_1.__metadata("design:type", String)
190
+ ], TestSpecificationPlan.prototype, "approverId", void 0);
191
+ tslib_1.__decorate([
192
+ (0, typeorm_1.Column)('varchar'),
193
+ tslib_1.__metadata("design:type", String)
194
+ ], TestSpecificationPlan.prototype, "submissionHash", void 0);
195
+ exports.TestSpecificationPlan = TestSpecificationPlan = tslib_1.__decorate([
196
+ (0, typeorm_1.Entity)('ops_test_spec_plan'),
197
+ (0, typeorm_1.Index)('ix_test_spec_plan_generation', ['domain', 'spec', 'generation'], { unique: true }),
198
+ (0, typeorm_1.Index)('ix_test_spec_plan_identity', ['domain', 'spec', 'id'], { unique: true }),
199
+ (0, typeorm_1.Index)('ix_test_spec_plan_decision', ['activityInstanceId'], { unique: true }),
200
+ (0, typeorm_1.Index)('ix_test_spec_plan_publication', ['publishedRevision'], { unique: true }),
201
+ (0, typeorm_1.ForeignKey)(() => master_change_policy_1.MasterChangePolicy, ['domain', 'policy'], ['domain', 'id'], { onDelete: 'RESTRICT' }),
202
+ (0, typeorm_1.ForeignKey)(() => TestSpecificationRevision, ['domain', 'spec', 'publishedRevision'], ['domain', 'spec', 'id'], { onDelete: 'RESTRICT' }),
203
+ (0, typeorm_1.ForeignKey)('TestSpecification', ['domain', 'spec'], ['domain', 'id'], { onDelete: 'RESTRICT' })
204
+ ], TestSpecificationPlan);
205
+ let TestSpecificationSegment = class TestSpecificationSegment {
206
+ };
207
+ exports.TestSpecificationSegment = TestSpecificationSegment;
208
+ tslib_1.__decorate([
209
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
210
+ tslib_1.__metadata("design:type", String)
211
+ ], TestSpecificationSegment.prototype, "id", void 0);
212
+ tslib_1.__decorate([
213
+ (0, typeorm_1.ManyToOne)(() => shell_1.Domain, { nullable: false }),
214
+ tslib_1.__metadata("design:type", shell_1.Domain)
215
+ ], TestSpecificationSegment.prototype, "domain", void 0);
216
+ tslib_1.__decorate([
217
+ (0, typeorm_1.RelationId)((row) => row.domain),
218
+ tslib_1.__metadata("design:type", String)
219
+ ], TestSpecificationSegment.prototype, "domainId", void 0);
220
+ tslib_1.__decorate([
221
+ (0, typeorm_1.ManyToOne)('TestSpecification', { nullable: false, createForeignKeyConstraints: false }),
222
+ tslib_1.__metadata("design:type", Function)
223
+ ], TestSpecificationSegment.prototype, "spec", void 0);
224
+ tslib_1.__decorate([
225
+ (0, typeorm_1.RelationId)((row) => row.spec),
226
+ tslib_1.__metadata("design:type", String)
227
+ ], TestSpecificationSegment.prototype, "specId", void 0);
228
+ tslib_1.__decorate([
229
+ (0, typeorm_1.ManyToOne)(() => TestSpecificationPlan, { nullable: false, createForeignKeyConstraints: false }),
230
+ tslib_1.__metadata("design:type", TestSpecificationPlan)
231
+ ], TestSpecificationSegment.prototype, "plan", void 0);
232
+ tslib_1.__decorate([
233
+ (0, typeorm_1.RelationId)((row) => row.plan),
234
+ tslib_1.__metadata("design:type", String)
235
+ ], TestSpecificationSegment.prototype, "planId", void 0);
236
+ tslib_1.__decorate([
237
+ (0, typeorm_1.ManyToOne)(() => TestSpecificationRevision, { nullable: false, createForeignKeyConstraints: false }),
238
+ tslib_1.__metadata("design:type", TestSpecificationRevision)
239
+ ], TestSpecificationSegment.prototype, "revision", void 0);
240
+ tslib_1.__decorate([
241
+ (0, typeorm_1.RelationId)((row) => row.revision),
242
+ tslib_1.__metadata("design:type", String)
243
+ ], TestSpecificationSegment.prototype, "revisionId", void 0);
244
+ tslib_1.__decorate([
245
+ (0, typeorm_1.Column)({ type: Date }),
246
+ tslib_1.__metadata("design:type", Date)
247
+ ], TestSpecificationSegment.prototype, "validFrom", void 0);
248
+ tslib_1.__decorate([
249
+ (0, typeorm_1.Column)({ type: Date, nullable: true }),
250
+ tslib_1.__metadata("design:type", Date)
251
+ ], TestSpecificationSegment.prototype, "validTo", void 0);
252
+ exports.TestSpecificationSegment = TestSpecificationSegment = tslib_1.__decorate([
253
+ (0, typeorm_1.Entity)('ops_test_spec_segment'),
254
+ (0, typeorm_1.Index)('ix_test_spec_segment_lookup', ['domain', 'spec', 'plan', 'validFrom']),
255
+ (0, typeorm_1.ForeignKey)('TestSpecification', ['domain', 'spec'], ['domain', 'id'], { onDelete: 'RESTRICT' }),
256
+ (0, typeorm_1.ForeignKey)(() => TestSpecificationPlan, ['domain', 'spec', 'plan'], ['domain', 'spec', 'id'], { onDelete: 'RESTRICT' }),
257
+ (0, typeorm_1.ForeignKey)(() => TestSpecificationRevision, ['domain', 'spec', 'revision'], ['domain', 'spec', 'id'], {
258
+ onDelete: 'RESTRICT'
259
+ })
260
+ ], TestSpecificationSegment);
261
+ /** Permanent evidence of the selected revision, also the retroactivity interlock. */
262
+ let TestSpecificationBasis = class TestSpecificationBasis {
263
+ };
264
+ exports.TestSpecificationBasis = TestSpecificationBasis;
265
+ tslib_1.__decorate([
266
+ (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
267
+ tslib_1.__metadata("design:type", String)
268
+ ], TestSpecificationBasis.prototype, "id", void 0);
269
+ tslib_1.__decorate([
270
+ (0, typeorm_1.ManyToOne)(() => shell_1.Domain, { nullable: false }),
271
+ tslib_1.__metadata("design:type", shell_1.Domain)
272
+ ], TestSpecificationBasis.prototype, "domain", void 0);
273
+ tslib_1.__decorate([
274
+ (0, typeorm_1.RelationId)((row) => row.domain),
275
+ tslib_1.__metadata("design:type", String)
276
+ ], TestSpecificationBasis.prototype, "domainId", void 0);
277
+ tslib_1.__decorate([
278
+ (0, typeorm_1.ManyToOne)('TestSpecification', { nullable: false, createForeignKeyConstraints: false }),
279
+ tslib_1.__metadata("design:type", Function)
280
+ ], TestSpecificationBasis.prototype, "spec", void 0);
281
+ tslib_1.__decorate([
282
+ (0, typeorm_1.RelationId)((row) => row.spec),
283
+ tslib_1.__metadata("design:type", String)
284
+ ], TestSpecificationBasis.prototype, "specId", void 0);
285
+ tslib_1.__decorate([
286
+ (0, typeorm_1.Column)('varchar'),
287
+ tslib_1.__metadata("design:type", String)
288
+ ], TestSpecificationBasis.prototype, "recordKey", void 0);
289
+ tslib_1.__decorate([
290
+ (0, typeorm_1.ManyToOne)(() => TestSpecificationRevision, { nullable: false, createForeignKeyConstraints: false }),
291
+ tslib_1.__metadata("design:type", TestSpecificationRevision)
292
+ ], TestSpecificationBasis.prototype, "revision", void 0);
293
+ tslib_1.__decorate([
294
+ (0, typeorm_1.RelationId)((row) => row.revision),
295
+ tslib_1.__metadata("design:type", String)
296
+ ], TestSpecificationBasis.prototype, "revisionId", void 0);
297
+ tslib_1.__decorate([
298
+ (0, typeorm_1.ManyToOne)(() => TestSpecificationPlan, { nullable: false, createForeignKeyConstraints: false }),
299
+ tslib_1.__metadata("design:type", TestSpecificationPlan)
300
+ ], TestSpecificationBasis.prototype, "plan", void 0);
301
+ tslib_1.__decorate([
302
+ (0, typeorm_1.RelationId)((row) => row.plan),
303
+ tslib_1.__metadata("design:type", String)
304
+ ], TestSpecificationBasis.prototype, "planId", void 0);
305
+ tslib_1.__decorate([
306
+ (0, typeorm_1.Column)('varchar'),
307
+ tslib_1.__metadata("design:type", String)
308
+ ], TestSpecificationBasis.prototype, "contentHash", void 0);
309
+ tslib_1.__decorate([
310
+ (0, typeorm_1.Column)({ type: Date }),
311
+ tslib_1.__metadata("design:type", Date)
312
+ ], TestSpecificationBasis.prototype, "businessTime", void 0);
313
+ tslib_1.__decorate([
314
+ (0, typeorm_1.Column)({ type: Date }),
315
+ tslib_1.__metadata("design:type", Date)
316
+ ], TestSpecificationBasis.prototype, "resolvedAt", void 0);
317
+ exports.TestSpecificationBasis = TestSpecificationBasis = tslib_1.__decorate([
318
+ (0, typeorm_1.Entity)('ops_test_spec_basis'),
319
+ (0, typeorm_1.Index)('ix_test_spec_basis_identity', ['domain', 'id', 'revision'], { unique: true }),
320
+ (0, typeorm_1.Index)('ix_test_spec_basis_record', ['domain', 'recordKey'], { unique: true }),
321
+ (0, typeorm_1.Index)('ix_test_spec_basis_time', ['domain', 'spec', 'businessTime']),
322
+ (0, typeorm_1.ForeignKey)('TestSpecification', ['domain', 'spec'], ['domain', 'id'], { onDelete: 'RESTRICT' }),
323
+ (0, typeorm_1.ForeignKey)(() => TestSpecificationPlan, ['domain', 'spec', 'plan'], ['domain', 'spec', 'id'], { onDelete: 'RESTRICT' }),
324
+ (0, typeorm_1.ForeignKey)(() => TestSpecificationRevision, ['domain', 'spec', 'revision'], ['domain', 'spec', 'id'], {
325
+ onDelete: 'RESTRICT'
326
+ })
327
+ ], TestSpecificationBasis);
328
+ exports.TEST_SPEC_REVISION_ENTITIES = [
329
+ TestSpecificationRevision,
330
+ TestSpecificationPlan,
331
+ TestSpecificationSegment,
332
+ TestSpecificationBasis
333
+ ];
334
+ //# sourceMappingURL=test-spec-revision.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-spec-revision.js","sourceRoot":"","sources":["../../../server/service/test-spec/test-spec-revision.ts"],"names":[],"mappings":";;;;AAAA,qCAA0G;AAC1G,iDAA8C;AAC9C,yDAAgD;AAEhD,kEAA4D;AAG5D,0EAA0E;AAC1E,iFAAiF;AACjF,4EAA4E;AAE5E,2FAA2F;AAUpF,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;CAoCrC,CAAA;AApCY,8DAAyB;AAErB;IAAd,IAAA,gBAAM,EAAC,KAAK,CAAC;;iEAAuB;AAErC;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,yCAAkB,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,2BAA2B,EAAE,KAAK,EAAE,CAAC;sCACrF,yCAAkB;yDAAA;AAE1B;IADC,IAAA,oBAAU,EAAC,CAAC,GAA8B,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;;2DAC3C;AACgB;IAA/B,IAAA,gCAAsB,EAAC,MAAM,CAAC;;qDAAW;AAE1C;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,cAAM,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;sCACrC,cAAM;yDAAA;AAEd;IADC,IAAA,oBAAU,EAAC,CAAC,GAA8B,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC;;2DAC3C;AAEhB;IADC,IAAA,mBAAS,EAAC,mBAA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B,sBAAsB;IATlC,IAAA,gBAAM,EAAC,qBAAqB,CAAC;IAC7B,IAAA,eAAK,EAAC,6BAA6B,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACpF,IAAA,eAAK,EAAC,2BAA2B,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC7E,IAAA,eAAK,EAAC,yBAAyB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC;IACpE,IAAA,oBAAU,EAAC,mBAAmB,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAC/F,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IACvH,IAAA,oBAAU,EAAC,GAAG,EAAE,CAAC,yBAAyB,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QACrG,QAAQ,EAAE,UAAU;KACrB,CAAC;GACW,sBAAsB,CAsBlC;AAEY,QAAA,2BAA2B,GAAG;IACzC,yBAAyB;IACzB,qBAAqB;IACrB,wBAAwB;IACxB,sBAAsB;CACvB,CAAA","sourcesContent":["import { Column, Entity, ForeignKey, Index, ManyToOne, PrimaryGeneratedColumn, RelationId } from 'typeorm'\nimport { Domain } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport type { TestSpecification } from './test-specification'\nimport { MasterChangePolicy } from '../master-change-policy'\nimport type { TestSpecificationCriterion } from '@operato/ops-contract'\n\n// Relations own the columns and RelationId exposes read-only identifiers.\n// Where a composite FK is declared, disable only the redundant single-column FK;\n// the database still enforces existence, domain and specification together.\n\n/** Content and the proposed effective date freeze together. Worklist owns the decision. */\n@Entity('ops_test_spec_revision')\n@Index('ix_test_spec_revision_subject', ['domain', 'spec', 'id'], { unique: true })\n@Index('ix_test_spec_revision_list', ['domain', 'spec', 'createdAt'])\n@ForeignKey(() => MasterChangePolicy, ['domain', 'policy'], ['domain', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey('TestSpecification', ['domain', 'spec'], ['domain', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey('TestSpecificationRevision', ['domain', 'spec', 'baseRevision'], ['domain', 'spec', 'id'], {\n onDelete: 'RESTRICT'\n})\n@Index('ix_spec_revision_number', ['domain', 'spec', 'revisionNumber'], { unique: true })\nexport class TestSpecificationRevision {\n /** Human revision number within one identity; assigned once under the subject write lock. */\n @Column('int') revisionNumber: number\n @ManyToOne(() => MasterChangePolicy, { nullable: false, createForeignKeyConstraints: false })\n policy: MasterChangePolicy\n @RelationId((row: TestSpecificationRevision) => row.policy)\n policyId: string\n @PrimaryGeneratedColumn('uuid') id: string\n @ManyToOne(() => Domain, { nullable: false })\n domain: Domain\n @RelationId((row: TestSpecificationRevision) => row.domain)\n domainId: string\n @ManyToOne('TestSpecification', { nullable: false, createForeignKeyConstraints: false })\n spec: TestSpecification\n @RelationId((row: TestSpecificationRevision) => row.spec)\n specId: string\n @ManyToOne(() => TestSpecificationRevision, { nullable: true, createForeignKeyConstraints: false })\n baseRevision: TestSpecificationRevision | null\n @RelationId((row: TestSpecificationRevision) => row.baseRevision)\n baseRevisionId: string | null\n @Column('int') baseGeneration: number\n @Column('int', { default: 0 }) editGeneration: number\n @Column('varchar') version: string\n @Column('text', { nullable: true }) description: string | null\n @Column('simple-json') criteria: TestSpecificationCriterion[]\n @Column({ type: Date }) effectiveFrom: Date\n @Column('text') reason: string\n @ManyToOne(() => User, { nullable: false })\n creator: User\n @RelationId((row: TestSpecificationRevision) => row.creator)\n creatorId: string\n @Column({ type: Date }) createdAt: Date\n @Column({ type: Date, nullable: true }) frozenAt: Date | null\n @Column('varchar', { nullable: true }) contentHash: string | null\n /** Opaque product decision ID: the common master module does not depend on worklist. */\n @Column('varchar', { nullable: true }) activityInstanceId: string | null\n}\n\n/** An append-only generation of the complete schedule for one specification. */\n@Entity('ops_test_spec_plan')\n@Index('ix_test_spec_plan_generation', ['domain', 'spec', 'generation'], { unique: true })\n@Index('ix_test_spec_plan_identity', ['domain', 'spec', 'id'], { unique: true })\n@Index('ix_test_spec_plan_decision', ['activityInstanceId'], { unique: true })\n@Index('ix_test_spec_plan_publication', ['publishedRevision'], { unique: true })\n@ForeignKey(() => MasterChangePolicy, ['domain', 'policy'], ['domain', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey(() => TestSpecificationRevision, ['domain', 'spec', 'publishedRevision'], ['domain', 'spec', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey('TestSpecification', ['domain', 'spec'], ['domain', 'id'], { onDelete: 'RESTRICT' })\nexport class TestSpecificationPlan {\n @ManyToOne(() => MasterChangePolicy, { nullable: false, createForeignKeyConstraints: false })\n policy: MasterChangePolicy\n @RelationId((row: TestSpecificationPlan) => row.policy)\n policyId: string\n @ManyToOne(() => TestSpecificationRevision, { nullable: false, createForeignKeyConstraints: false })\n publishedRevision: TestSpecificationRevision\n @RelationId((row: TestSpecificationPlan) => row.publishedRevision)\n publishedRevisionId: string\n @Column('varchar') releaseKind: 'approved' | 'policy'\n @ManyToOne(() => User, { nullable: false }) publisher: User\n @RelationId((row: TestSpecificationPlan) => row.publisher) publisherId: string\n @PrimaryGeneratedColumn('uuid') id: string\n @ManyToOne(() => Domain, { nullable: false })\n domain: Domain\n @RelationId((row: TestSpecificationPlan) => row.domain)\n domainId: string\n @ManyToOne('TestSpecification', { nullable: false, createForeignKeyConstraints: false })\n spec: TestSpecification\n @RelationId((row: TestSpecificationPlan) => row.spec)\n specId: string\n @Column('int') generation: number\n @Column({ type: Date }) recordedAt: Date\n @Column('varchar', { nullable: true }) activityInstanceId: string | null\n @ManyToOne(() => User, { nullable: true })\n approver: User\n @RelationId((row: TestSpecificationPlan) => row.approver)\n approverId: string\n @Column('varchar') submissionHash: string\n}\n\n@Entity('ops_test_spec_segment')\n@Index('ix_test_spec_segment_lookup', ['domain', 'spec', 'plan', 'validFrom'])\n@ForeignKey('TestSpecification', ['domain', 'spec'], ['domain', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey(() => TestSpecificationPlan, ['domain', 'spec', 'plan'], ['domain', 'spec', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey(() => TestSpecificationRevision, ['domain', 'spec', 'revision'], ['domain', 'spec', 'id'], {\n onDelete: 'RESTRICT'\n})\nexport class TestSpecificationSegment {\n @PrimaryGeneratedColumn('uuid') id: string\n @ManyToOne(() => Domain, { nullable: false })\n domain: Domain\n @RelationId((row: TestSpecificationSegment) => row.domain)\n domainId: string\n @ManyToOne('TestSpecification', { nullable: false, createForeignKeyConstraints: false })\n spec: TestSpecification\n @RelationId((row: TestSpecificationSegment) => row.spec)\n specId: string\n @ManyToOne(() => TestSpecificationPlan, { nullable: false, createForeignKeyConstraints: false })\n plan: TestSpecificationPlan\n @RelationId((row: TestSpecificationSegment) => row.plan)\n planId: string\n @ManyToOne(() => TestSpecificationRevision, { nullable: false, createForeignKeyConstraints: false })\n revision: TestSpecificationRevision\n @RelationId((row: TestSpecificationSegment) => row.revision)\n revisionId: string\n @Column({ type: Date }) validFrom: Date\n @Column({ type: Date, nullable: true }) validTo: Date | null\n}\n\n/** Permanent evidence of the selected revision, also the retroactivity interlock. */\n@Entity('ops_test_spec_basis')\n@Index('ix_test_spec_basis_identity', ['domain', 'id', 'revision'], { unique: true })\n@Index('ix_test_spec_basis_record', ['domain', 'recordKey'], { unique: true })\n@Index('ix_test_spec_basis_time', ['domain', 'spec', 'businessTime'])\n@ForeignKey('TestSpecification', ['domain', 'spec'], ['domain', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey(() => TestSpecificationPlan, ['domain', 'spec', 'plan'], ['domain', 'spec', 'id'], { onDelete: 'RESTRICT' })\n@ForeignKey(() => TestSpecificationRevision, ['domain', 'spec', 'revision'], ['domain', 'spec', 'id'], {\n onDelete: 'RESTRICT'\n})\nexport class TestSpecificationBasis {\n @PrimaryGeneratedColumn('uuid') id: string\n @ManyToOne(() => Domain, { nullable: false })\n domain: Domain\n @RelationId((row: TestSpecificationBasis) => row.domain)\n domainId: string\n @ManyToOne('TestSpecification', { nullable: false, createForeignKeyConstraints: false })\n spec: TestSpecification\n @RelationId((row: TestSpecificationBasis) => row.spec)\n specId: string\n @Column('varchar') recordKey: string\n @ManyToOne(() => TestSpecificationRevision, { nullable: false, createForeignKeyConstraints: false })\n revision: TestSpecificationRevision\n @RelationId((row: TestSpecificationBasis) => row.revision)\n revisionId: string\n @ManyToOne(() => TestSpecificationPlan, { nullable: false, createForeignKeyConstraints: false })\n plan: TestSpecificationPlan\n @RelationId((row: TestSpecificationBasis) => row.plan)\n planId: string\n @Column('varchar') contentHash: string\n @Column({ type: Date }) businessTime: Date\n @Column({ type: Date }) resolvedAt: Date\n}\n\nexport const TEST_SPEC_REVISION_ENTITIES = [\n TestSpecificationRevision,\n TestSpecificationPlan,\n TestSpecificationSegment,\n TestSpecificationBasis\n]\n"]}
@@ -10,9 +10,15 @@ import { User } from '@things-factory/auth-base';
10
10
  * 남아야 한다.
11
11
  */
12
12
  export declare class TestSpecification {
13
+ /** Read projection of the effective revision, not a mutable identity column. */
14
+ revisionNumber?: number;
13
15
  readonly id: string;
14
16
  domain?: Domain;
15
17
  domainId?: string;
18
+ /** Changes only when an approved schedule is published. */
19
+ planGeneration: number;
20
+ /** Serializes publication and basis capture without making reads a new schedule. */
21
+ revisionLock: number;
16
22
  /** 표준 `ID` — 자원이 이 값을 가리킨다. */
17
23
  name: string;
18
24
  description?: string;
@@ -18,13 +18,17 @@ const auth_base_1 = require("@things-factory/auth-base");
18
18
  let TestSpecification = class TestSpecification {
19
19
  };
20
20
  exports.TestSpecification = TestSpecification;
21
+ tslib_1.__decorate([
22
+ (0, type_graphql_1.Field)(() => type_graphql_1.Int, { nullable: true }),
23
+ tslib_1.__metadata("design:type", Number)
24
+ ], TestSpecification.prototype, "revisionNumber", void 0);
21
25
  tslib_1.__decorate([
22
26
  (0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
23
27
  (0, type_graphql_1.Field)(type => type_graphql_1.ID),
24
28
  tslib_1.__metadata("design:type", String)
25
29
  ], TestSpecification.prototype, "id", void 0);
26
30
  tslib_1.__decorate([
27
- (0, typeorm_1.ManyToOne)(type => shell_1.Domain),
31
+ (0, typeorm_1.ManyToOne)(type => shell_1.Domain, { nullable: false }),
28
32
  (0, type_graphql_1.Field)(type => shell_1.Domain),
29
33
  tslib_1.__metadata("design:type", shell_1.Domain)
30
34
  ], TestSpecification.prototype, "domain", void 0);
@@ -32,6 +36,14 @@ tslib_1.__decorate([
32
36
  (0, typeorm_1.RelationId)((spec) => spec.domain),
33
37
  tslib_1.__metadata("design:type", String)
34
38
  ], TestSpecification.prototype, "domainId", void 0);
39
+ tslib_1.__decorate([
40
+ (0, typeorm_1.Column)('int', { default: 0 }),
41
+ tslib_1.__metadata("design:type", Number)
42
+ ], TestSpecification.prototype, "planGeneration", void 0);
43
+ tslib_1.__decorate([
44
+ (0, typeorm_1.Column)('int', { default: 0 }),
45
+ tslib_1.__metadata("design:type", Number)
46
+ ], TestSpecification.prototype, "revisionLock", void 0);
35
47
  tslib_1.__decorate([
36
48
  (0, typeorm_1.Column)(),
37
49
  (0, type_graphql_1.Field)(),
@@ -98,9 +110,10 @@ tslib_1.__decorate([
98
110
  ], TestSpecification.prototype, "updaterId", void 0);
99
111
  exports.TestSpecification = TestSpecification = tslib_1.__decorate([
100
112
  (0, typeorm_1.Entity)({ name: 'ops_test_specification' }),
101
- (0, typeorm_1.Index)('ix_ops_test_specification_0', (spec) => [spec.domain, spec.name, spec.version], {
113
+ (0, typeorm_1.Index)('ix_ops_test_specification_0', (spec) => [spec.domain, spec.name], {
102
114
  unique: true
103
115
  }),
116
+ (0, typeorm_1.Index)('ix_ops_test_specification_identity', (spec) => [spec.domain, spec.id], { unique: true }),
104
117
  (0, type_graphql_1.ObjectType)({ description: 'ISA-95 TestSpecification — what a qualification is verified against' })
105
118
  ], TestSpecification);
106
119
  //# sourceMappingURL=test-specification.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"test-specification.js","sourceRoot":"","sources":["../../../server/service/test-spec/test-specification.ts"],"names":[],"mappings":";;;;AAAA,qCASgB;AAChB,+CAAoD;AAEpD,iDAA4D;AAC5D,yDAAgD;AAEhD;;;;;;;;GAQG;AAMI,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAsE7B,CAAA;AAtEY,8CAAiB;AAGnB;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;6CACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;sCACb,cAAM;iDAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,IAAuB,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC;;mDACpC;AAKjB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,GAAE;;+CACI;AAIZ;IAFC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1B,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDACN;AAKpB;IAFC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC1B,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAA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C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAC9B,gBAAI;kDAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,IAAuB,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;;oDACpC;4BArEP,iBAAiB;IAL7B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC;IAC1C,IAAA,eAAK,EAAC,6BAA6B,EAAE,CAAC,IAAuB,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE;QACzG,MAAM,EAAE,IAAI;KACb,CAAC;IACD,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,qEAAqE,EAAE,CAAC;GACtF,iBAAiB,CAsE7B","sourcesContent":["import {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\nimport { Field, ID, ObjectType } from 'type-graphql'\n\nimport { Domain, ScalarObject } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\n/**\n * `TestSpecification` — **ISA-95 표준 명세**.\n *\n * 자원의 `testSpecificationIds` 가 가리키는 대상이다. 「무엇으로 검증하는가」를 이름으로 답하고,\n * 기준(`criteria`)을 적으면 「판단에 근거가 있는가」까지 물을 수 있다.\n *\n * 버전을 갖는 이유는 같은 명세의 버전이 바뀌면 자격의 뜻도 바뀌기 때문이다 — 어느 버전으로 검증했는지가\n * 남아야 한다.\n */\n@Entity({ name: 'ops_test_specification' })\n@Index('ix_ops_test_specification_0', (spec: TestSpecification) => [spec.domain, spec.name, spec.version], {\n unique: true\n})\n@ObjectType({ description: 'ISA-95 TestSpecification — what a qualification is verified against' })\nexport class TestSpecification {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((spec: TestSpecification) => spec.domain)\n domainId?: string\n\n /** 표준 `ID` — 자원이 이 값을 가리킨다. */\n @Column()\n @Field()\n name: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n /** 표준 `Version`. 버전이 바뀌면 자격의 뜻이 바뀐다. */\n @Column({ nullable: true })\n @Field({ nullable: true })\n version?: string\n\n /**\n * 판단 기준들 — 표준 `TestSpecificationCriteria`.\n *\n * 한계값에는 단위가 함께 있어야 한다. 섭씨 한계에 화씨 관측을 비교하면 오류보고없이 틀린 답이 나온다.\n */\n @Column({ type: 'simple-json', nullable: true })\n @Field(type => ScalarObject, { nullable: true, description: 'TestSpecificationCriterion[]' })\n criteria?: Record<string, unknown>[]\n\n /** 언제부터 유효한가 — 표준 `EffectiveStartDate`. */\n @Column({ nullable: true })\n @Field({ nullable: true })\n effectiveStart?: Date\n\n /**\n * 언제까지 유효한가 — 표준 `EffectiveEndDate`.\n *\n * **없앨 때 행을 지우지 않고 이 칸을 채운다.** 지우면 그것을 가리키는 지난 기록이 가리킬 것을 잃는다.\n */\n @Column({ nullable: true })\n @Field({ nullable: true })\n effectiveEnd?: Date\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((spec: TestSpecification) => spec.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((spec: TestSpecification) => spec.updater)\n updaterId?: string\n}\n"]}
1
+ {"version":3,"file":"test-specification.js","sourceRoot":"","sources":["../../../server/service/test-spec/test-specification.ts"],"names":[],"mappings":";;;;AAAA,qCASgB;AAChB,+CAAyD;AAEzD,iDAA4D;AAC5D,yDAAgD;AAEhD;;;;;;;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,CAAC,IAAuB,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;;oDACpC;4BAhFP,iBAAiB;IAN7B,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,wBAAwB,EAAE,CAAC;IAC1C,IAAA,eAAK,EAAC,6BAA6B,EAAE,CAAC,IAAuB,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE;QAC3F,MAAM,EAAE,IAAI;KACb,CAAC;IACD,IAAA,eAAK,EAAC,oCAAoC,EAAE,CAAC,IAAuB,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAClH,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,qEAAqE,EAAE,CAAC;GACtF,iBAAiB,CAiF7B","sourcesContent":["import {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\nimport { Field, ID, Int, ObjectType } from 'type-graphql'\n\nimport { Domain, ScalarObject } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\n/**\n * `TestSpecification` — **ISA-95 표준 명세**.\n *\n * 자원의 `testSpecificationIds` 가 가리키는 대상이다. 「무엇으로 검증하는가」를 이름으로 답하고,\n * 기준(`criteria`)을 적으면 「판단에 근거가 있는가」까지 물을 수 있다.\n *\n * 버전을 갖는 이유는 같은 명세의 버전이 바뀌면 자격의 뜻도 바뀌기 때문이다 — 어느 버전으로 검증했는지가\n * 남아야 한다.\n */\n@Entity({ name: 'ops_test_specification' })\n@Index('ix_ops_test_specification_0', (spec: TestSpecification) => [spec.domain, spec.name], {\n unique: true\n})\n@Index('ix_ops_test_specification_identity', (spec: TestSpecification) => [spec.domain, spec.id], { unique: true })\n@ObjectType({ description: 'ISA-95 TestSpecification — what a qualification is verified against' })\nexport class TestSpecification {\n /** Read projection of the effective revision, not a mutable identity column. */\n @Field(() => Int, { nullable: true })\n revisionNumber?: number\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain, { nullable: false })\n @Field(type => Domain)\n domain?: Domain\n\n @RelationId((spec: TestSpecification) => spec.domain)\n domainId?: string\n\n /** Changes only when an approved schedule is published. */\n @Column('int', { default: 0 })\n planGeneration: number\n\n /** Serializes publication and basis capture without making reads a new schedule. */\n @Column('int', { default: 0 })\n revisionLock: number\n\n /** 표준 `ID` — 자원이 이 값을 가리킨다. */\n @Column()\n @Field()\n name: string\n\n @Column({ nullable: true })\n @Field({ nullable: true })\n description?: string\n\n /** 표준 `Version`. 버전이 바뀌면 자격의 뜻이 바뀐다. */\n @Column({ nullable: true })\n @Field({ nullable: true })\n version?: string\n\n /**\n * 판단 기준들 — 표준 `TestSpecificationCriteria`.\n *\n * 한계값에는 단위가 함께 있어야 한다. 섭씨 한계에 화씨 관측을 비교하면 오류보고없이 틀린 답이 나온다.\n */\n @Column({ type: 'simple-json', nullable: true })\n @Field(type => ScalarObject, { nullable: true, description: 'TestSpecificationCriterion[]' })\n criteria?: Record<string, unknown>[]\n\n /** 언제부터 유효한가 — 표준 `EffectiveStartDate`. */\n @Column({ nullable: true })\n @Field({ nullable: true })\n effectiveStart?: Date\n\n /**\n * 언제까지 유효한가 — 표준 `EffectiveEndDate`.\n *\n * **없앨 때 행을 지우지 않고 이 칸을 채운다.** 지우면 그것을 가리키는 지난 기록이 가리킬 것을 잃는다.\n */\n @Column({ nullable: true })\n @Field({ nullable: true })\n effectiveEnd?: Date\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n creator?: User\n\n @RelationId((spec: TestSpecification) => spec.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true })\n updater?: User\n\n @RelationId((spec: TestSpecification) => spec.updater)\n updaterId?: string\n}\n"]}