Merge branch 'develop' into adiDev
This commit is contained in:
commit
4e6e5a7023
3 changed files with 48 additions and 1 deletions
|
|
@ -7,6 +7,20 @@ import { KpiPlanHistory } from "./kpiPlanHistory";
|
||||||
|
|
||||||
@Entity("kpiPlan")
|
@Entity("kpiPlan")
|
||||||
export class KpiPlan extends EntityBase {
|
export class KpiPlan extends EntityBase {
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "รอบ",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
period: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "ปี",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
year: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "ลำดับ/รหัสตัวชี้วัด",
|
comment: "ลำดับ/รหัสตัวชี้วัด",
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,20 @@ import { KpiRoleHistory } from "./kpiRoleHistory";
|
||||||
|
|
||||||
@Entity("kpiRole")
|
@Entity("kpiRole")
|
||||||
export class KpiRole extends EntityBase {
|
export class KpiRole extends EntityBase {
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "รอบ",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
period: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "ปี",
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
year: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "ตำแหน่ง",
|
comment: "ตำแหน่ง",
|
||||||
|
|
@ -224,7 +238,6 @@ export class KpiRole extends EntityBase {
|
||||||
})
|
})
|
||||||
documentInfoEvidence: string;
|
documentInfoEvidence: string;
|
||||||
|
|
||||||
|
|
||||||
@ManyToOne(() => KpiPeriod, (kpiPeriod) => kpiPeriod.kpiRoles)
|
@ManyToOne(() => KpiPeriod, (kpiPeriod) => kpiPeriod.kpiRoles)
|
||||||
@JoinColumn({ name: "kpiPeriodId" })
|
@JoinColumn({ name: "kpiPeriodId" })
|
||||||
kpiPeriod: KpiPeriod;
|
kpiPeriod: KpiPeriod;
|
||||||
|
|
|
||||||
20
src/migration/1715051771366-update_table_kpiPlan_add_year.ts
Normal file
20
src/migration/1715051771366-update_table_kpiPlan_add_year.ts
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateTableKpiPlanAddYear1715051771366 implements MigrationInterface {
|
||||||
|
name = 'UpdateTableKpiPlanAddYear1715051771366'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiPlan\` ADD \`period\` varchar(255) NULL COMMENT 'รอบ'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiPlan\` ADD \`year\` varchar(255) NULL COMMENT 'ปี'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiRole\` ADD \`period\` varchar(255) NULL COMMENT 'รอบ'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiRole\` ADD \`year\` varchar(255) NULL COMMENT 'ปี'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiRole\` DROP COLUMN \`year\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiRole\` DROP COLUMN \`period\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiPlan\` DROP COLUMN \`year\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiPlan\` DROP COLUMN \`period\``);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue