From c94f9c4b06ade839441de319f0bc45ad1ca2a80c Mon Sep 17 00:00:00 2001 From: Kittapath Date: Thu, 9 May 2024 16:00:24 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=A5=E0=B8=9A=20summary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/entities/kpiUserDevelopment.ts | 11 +++++++---- ...0866-update_table_kpiSpecial_unit_to_string1.ts | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 src/migration/1715245130866-update_table_kpiSpecial_unit_to_string1.ts diff --git a/src/entities/kpiUserDevelopment.ts b/src/entities/kpiUserDevelopment.ts index 2c6f97c..b336908 100644 --- a/src/entities/kpiUserDevelopment.ts +++ b/src/entities/kpiUserDevelopment.ts @@ -27,6 +27,13 @@ export class KpiUserDevelopment extends EntityBase { }) summary: number; + @Column({ + nullable: true, + comment: "ระดับคะแนน", + default: null, + }) + point: number; + @Column({ nullable: true, comment: "เกณฑ์การประเมิน 10", @@ -91,8 +98,6 @@ export class CreateKpiUserDevelopment { @Column() target: string | null; @Column() - summary?: number | null; - @Column() achievement10?: string | null; @Column() achievement5?: string | null; @@ -114,8 +119,6 @@ export class UpdateKpiUserDevelopment { @Column() target: string | null; @Column() - summary?: number | null; - @Column() achievement10?: string | null; @Column() achievement5?: string | null; diff --git a/src/migration/1715245130866-update_table_kpiSpecial_unit_to_string1.ts b/src/migration/1715245130866-update_table_kpiSpecial_unit_to_string1.ts new file mode 100644 index 0000000..9821248 --- /dev/null +++ b/src/migration/1715245130866-update_table_kpiSpecial_unit_to_string1.ts @@ -0,0 +1,14 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateTableKpiSpecialUnitToString11715245130866 implements MigrationInterface { + name = 'UpdateTableKpiSpecialUnitToString11715245130866' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`kpiUserDevelopment\` ADD \`point\` int NULL COMMENT 'ระดับคะแนน'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`kpiUserDevelopment\` DROP COLUMN \`point\``); + } + +}