เพิ่มฟิว isResult
This commit is contained in:
parent
f5ba594a84
commit
2a7a5d5922
2 changed files with 52 additions and 0 deletions
|
|
@ -216,6 +216,36 @@ export class SalaryProfile extends EntityBase {
|
|||
})
|
||||
child4: string;
|
||||
|
||||
@Column({
|
||||
comment: "ผลการประเมิน",
|
||||
default: false,
|
||||
})
|
||||
isResult: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "ระยะเวลา",
|
||||
default: false,
|
||||
})
|
||||
isDuration: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "การลงโทษ",
|
||||
default: false,
|
||||
})
|
||||
isPunish: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "พักราชการ",
|
||||
default: false,
|
||||
})
|
||||
isRetired: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "ขาดราชการ",
|
||||
default: false,
|
||||
})
|
||||
isRetired2: boolean;
|
||||
|
||||
@ManyToOne(() => SalaryOrg, (salaryOrg) => salaryOrg.salaryProfiles)
|
||||
@JoinColumn({ name: "salaryOrgId" })
|
||||
salaryOrg: SalaryOrg;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,22 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableSalaryProfileAddIsresult1709013351821 implements MigrationInterface {
|
||||
name = 'UpdateTableSalaryProfileAddIsresult1709013351821'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`isResult\` tinyint NOT NULL COMMENT 'ผลการประเมิน' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`isDuration\` tinyint NOT NULL COMMENT 'ระยะเวลา' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`isPunish\` tinyint NOT NULL COMMENT 'การลงโทษ' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`isRetired\` tinyint NOT NULL COMMENT 'พักราชการ' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` ADD \`isRetired2\` tinyint NOT NULL COMMENT 'ขาดราชการ' DEFAULT 0`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`isRetired2\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`isRetired\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`isPunish\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`isDuration\``);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` DROP COLUMN \`isResult\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue