แก้ฟิว

This commit is contained in:
kittapath 2024-10-01 10:30:03 +07:00
parent a23ccd9bd7
commit 5643cc67c4
3 changed files with 80 additions and 47 deletions

View file

@ -40,27 +40,27 @@ export class ProfileDevelopment extends EntityBase {
})
name: string;
@Column({
nullable: true,
comment: "เป้าหมาย",
default: null,
})
target: string;
// @Column({
// nullable: true,
// comment: "เป้าหมาย",
// default: null,
// })
// target: string;
@Column({
type: "double",
nullable: true,
default: null,
comment: "ผลการประเมิน",
})
summary: number;
// @Column({
// type: "double",
// nullable: true,
// default: null,
// comment: "ผลการประเมิน",
// })
// summary: number;
@Column({
nullable: true,
comment: "ระดับคะแนน",
default: null,
})
point: number;
// @Column({
// nullable: true,
// comment: "ระดับคะแนน",
// default: null,
// })
// point: number;
@Column({
nullable: true,
@ -179,7 +179,7 @@ export class CreateProfileDevelopment {
type?: string | null;
profileId: string | null;
name: string | null;
target: string | null;
// target: string | null;
achievement10?: string | null;
achievement5?: string | null;
achievement0?: string | null;
@ -190,8 +190,11 @@ export class CreateProfileDevelopment {
isDevelopment70: boolean | null;
isDevelopment20: boolean | null;
isDevelopment10: boolean | null;
summary?: number | null;
point?: number | null;
// summary?: number | null;
// point?: number | null;
developmentTarget?: number | null;
developmentResults?: number | null;
developmentReport?: number | null;
developmentProjects?: string[];
}
@ -199,7 +202,7 @@ export class CreateProfileEmployeeDevelopment {
type?: string | null;
profileEmployeeId: string | null;
name: string | null;
target: string | null;
// target: string | null;
achievement10?: string | null;
achievement5?: string | null;
achievement0?: string | null;
@ -210,15 +213,18 @@ export class CreateProfileEmployeeDevelopment {
isDevelopment70: boolean | null;
isDevelopment20: boolean | null;
isDevelopment10: boolean | null;
summary?: number | null;
point?: number | null;
// summary?: number | null;
// point?: number | null;
developmentTarget?: number | null;
developmentResults?: number | null;
developmentReport?: number | null;
developmentProjects?: string[];
}
export type UpdateProfileDevelopment = {
type?: string | null;
name: string | null;
target: string | null;
// target: string | null;
achievement10?: string | null;
achievement5?: string | null;
achievement0?: string | null;
@ -229,7 +235,10 @@ export type UpdateProfileDevelopment = {
isDevelopment70: boolean | null;
isDevelopment20: boolean | null;
isDevelopment10: boolean | null;
summary?: number | null;
point?: number | null;
// summary?: number | null;
// point?: number | null;
developmentTarget?: number | null;
developmentResults?: number | null;
developmentReport?: number | null;
developmentProjects?: string[];
};

View file

@ -22,27 +22,27 @@ export class ProfileDevelopmentHistory extends EntityBase {
})
name: string;
@Column({
nullable: true,
comment: "เป้าหมาย",
default: null,
})
target: string;
// @Column({
// nullable: true,
// comment: "เป้าหมาย",
// default: null,
// })
// target: string;
@Column({
type: "double",
nullable: true,
default: null,
comment: "ผลการประเมิน",
})
summary: number;
// @Column({
// type: "double",
// nullable: true,
// default: null,
// comment: "ผลการประเมิน",
// })
// summary: number;
@Column({
nullable: true,
comment: "ระดับคะแนน",
default: null,
})
point: number;
// @Column({
// nullable: true,
// comment: "ระดับคะแนน",
// default: null,
// })
// point: number;
@Column({
nullable: true,

View file

@ -0,0 +1,24 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateProfileDevelopment1727752118300 implements MigrationInterface {
name = 'UpdateProfileDevelopment1727752118300'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileDevelopmentHistory\` DROP COLUMN \`point\``);
await queryRunner.query(`ALTER TABLE \`profileDevelopmentHistory\` DROP COLUMN \`summary\``);
await queryRunner.query(`ALTER TABLE \`profileDevelopmentHistory\` DROP COLUMN \`target\``);
await queryRunner.query(`ALTER TABLE \`profileDevelopment\` DROP COLUMN \`point\``);
await queryRunner.query(`ALTER TABLE \`profileDevelopment\` DROP COLUMN \`summary\``);
await queryRunner.query(`ALTER TABLE \`profileDevelopment\` DROP COLUMN \`target\``);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileDevelopment\` ADD \`target\` varchar(255) NULL COMMENT 'เป้าหมาย'`);
await queryRunner.query(`ALTER TABLE \`profileDevelopment\` ADD \`summary\` double NULL COMMENT 'ผลการประเมิน'`);
await queryRunner.query(`ALTER TABLE \`profileDevelopment\` ADD \`point\` int NULL COMMENT 'ระดับคะแนน'`);
await queryRunner.query(`ALTER TABLE \`profileDevelopmentHistory\` ADD \`target\` varchar(255) NULL COMMENT 'เป้าหมาย'`);
await queryRunner.query(`ALTER TABLE \`profileDevelopmentHistory\` ADD \`summary\` double NULL COMMENT 'ผลการประเมิน'`);
await queryRunner.query(`ALTER TABLE \`profileDevelopmentHistory\` ADD \`point\` int NULL COMMENT 'ระดับคะแนน'`);
}
}