This commit is contained in:
harid 2025-11-27 19:28:38 +07:00
parent 4bdf1ad7b4
commit 072d9a6880
3 changed files with 41 additions and 0 deletions

View file

@ -132,6 +132,8 @@ export class EducationLevelController extends Controller {
"id",
"name",
"rank",
"educationLevel",
"isHigh",
"createdAt",
"lastUpdatedAt",
"createdFullName",
@ -157,6 +159,8 @@ export class EducationLevelController extends Controller {
"id",
"name",
"rank",
"educationLevel",
"isHigh",
"createdAt",
"lastUpdatedAt",
"createdFullName",

View file

@ -17,6 +17,21 @@ export class EducationLevel extends EntityBase {
default: null,
})
rank: number;
@Column({
nullable: true,
comment: "ขีดจำกัดวุฒิการศึกษา",
length: 50,
default: null,
})
educationLevel?: string;
@Column({
nullable: true,
comment: "วุฒิการศึกษาสูงสุด",
default: null,
})
isHigh?: boolean;
}
export class CreateEducationLevel {
@ -25,6 +40,12 @@ export class CreateEducationLevel {
@Column()
rank: number;
@Column()
educationLevel?: string;
@Column()
isHigh?: boolean;
}
export type UpdateEducationLevel = Partial<CreateEducationLevel>;

View file

@ -0,0 +1,16 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableEducationLeaveAddFields1764244579743 implements MigrationInterface {
name = 'UpdateTableEducationLeaveAddFields1764244579743'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`educationLevel\` ADD \`educationLevel\` varchar(50) NULL COMMENT 'ขีดจำกัดวุฒิการศึกษา'`);
await queryRunner.query(`ALTER TABLE \`educationLevel\` ADD \`isHigh\` tinyint NULL COMMENT 'วุฒิการศึกษาสูงสุด'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`educationLevel\` DROP COLUMN \`isHigh\``);
await queryRunner.query(`ALTER TABLE \`educationLevel\` DROP COLUMN \`educationLevel\``);
}
}