@dirayaah/assessment-module 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/dto/assessment-response.dto.d.ts +1 -0
- package/dist/src/dto/assessment-response.dto.js +6 -0
- package/dist/src/dto/assessment-response.dto.js.map +1 -1
- package/dist/src/entities/assessment-response.entity.d.ts +1 -0
- package/dist/src/entities/assessment-response.entity.js +4 -0
- package/dist/src/entities/assessment-response.entity.js.map +1 -1
- package/dist/src/migrations/1771247066741-AlterAssessmentResponseAddSummary.d.ts +7 -0
- package/dist/src/migrations/1771247066741-AlterAssessmentResponseAddSummary.js +26 -0
- package/dist/src/migrations/1771247066741-AlterAssessmentResponseAddSummary.js.map +1 -0
- package/dist/src/migrations/index.d.ts +2 -1
- package/dist/src/migrations/index.js +4 -1
- package/dist/src/migrations/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/dto/assessment-response.dto.ts +6 -2
- package/src/entities/assessment-response.entity.ts +3 -0
- package/src/migrations/1771247066741-AlterAssessmentResponseAddSummary.ts +25 -0
- package/src/migrations/index.ts +3 -0
package/package.json
CHANGED
|
@@ -18,11 +18,15 @@ export class AssessmentResponseDto extends BaseDTO {
|
|
|
18
18
|
})
|
|
19
19
|
response: Record<string, any>;
|
|
20
20
|
|
|
21
|
-
|
|
22
21
|
@ApiPropertyOptional({ example: 'https://example.com/report.pdf' })
|
|
23
22
|
@IsOptional()
|
|
24
23
|
@IsString()
|
|
25
24
|
reportUrl?: string;
|
|
26
|
-
|
|
25
|
+
|
|
27
26
|
assessment?: AssessmentDto;
|
|
27
|
+
|
|
28
|
+
@ApiPropertyOptional({ example: 'https://example.com/report.pdf' })
|
|
29
|
+
@IsOptional()
|
|
30
|
+
@IsString()
|
|
31
|
+
summary?: string;
|
|
28
32
|
}
|
|
@@ -14,6 +14,9 @@ export class AssessmentResponseEntity extends BaseEntity {
|
|
|
14
14
|
@Column({ nullable: true, name: 'report_url' })
|
|
15
15
|
reportUrl?: string;
|
|
16
16
|
|
|
17
|
+
@Column({ nullable: true, name: 'summary' })
|
|
18
|
+
summary?: string;
|
|
19
|
+
|
|
17
20
|
@Column({ nullable: false, type: 'json' })
|
|
18
21
|
response: Record<string, any>;
|
|
19
22
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
|
|
2
|
+
|
|
3
|
+
export class AlterAssessmentResponseAddSummary1771247066741 implements MigrationInterface {
|
|
4
|
+
private tableName = 'assessment_response';
|
|
5
|
+
private columnName = 'summary';
|
|
6
|
+
|
|
7
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
8
|
+
if (!(await queryRunner.hasColumn(this.tableName, this.columnName))) {
|
|
9
|
+
await queryRunner.addColumn(
|
|
10
|
+
this.tableName,
|
|
11
|
+
new TableColumn({
|
|
12
|
+
name: this.columnName,
|
|
13
|
+
type: 'varchar',
|
|
14
|
+
isNullable: true,
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
21
|
+
if (await queryRunner.hasColumn(this.tableName, this.columnName)) {
|
|
22
|
+
await queryRunner.dropColumn(this.tableName, this.columnName);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
package/src/migrations/index.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { SeedPredefinedAssessments1767204696509 } from './1767204696509-SeedPred
|
|
|
7
7
|
import { AddMetaFieldsToAssessmentTable1767651698587 } from './1767651698587-AddMetaFieldsToAssessmentTable';
|
|
8
8
|
import { CreateAssessmentResponseTable1769428739895 } from './1769428739895-CreateAssessmentResponseTable';
|
|
9
9
|
import { AlterAssessmentResponseTable1771110620466 } from './1771110620466-AlterAssessmentResponseTable';
|
|
10
|
+
import { AlterAssessmentResponseAddSummary1771247066741 } from './1771247066741-AlterAssessmentResponseAddSummary';
|
|
10
11
|
export const AssessmentMigrations = [
|
|
11
12
|
CreateAssessmentTable1767108782301,
|
|
12
13
|
CreatePredefinedAssessmentTable1767200020161,
|
|
@@ -14,6 +15,7 @@ export const AssessmentMigrations = [
|
|
|
14
15
|
AddMetaFieldsToAssessmentTable1767651698587,
|
|
15
16
|
CreateAssessmentResponseTable1769428739895,
|
|
16
17
|
AlterAssessmentResponseTable1771110620466,
|
|
18
|
+
AlterAssessmentResponseAddSummary1771247066741,
|
|
17
19
|
];
|
|
18
20
|
|
|
19
21
|
export {
|
|
@@ -23,4 +25,5 @@ export {
|
|
|
23
25
|
AddMetaFieldsToAssessmentTable1767651698587,
|
|
24
26
|
CreateAssessmentResponseTable1769428739895,
|
|
25
27
|
AlterAssessmentResponseTable1771110620466,
|
|
28
|
+
AlterAssessmentResponseAddSummary1771247066741,
|
|
26
29
|
};
|