diff --git a/src/entities/RegistryEmployee.ts b/src/entities/RegistryEmployee.ts index e4b9dff6..31d0a8b2 100644 --- a/src/entities/RegistryEmployee.ts +++ b/src/entities/RegistryEmployee.ts @@ -327,6 +327,14 @@ export class RegistryEmployee extends EntityBase { default: null, }) fields: string; + + @Column({ + nullable: true, + comment: "ประเภทลูกจ้าง (perm->ลูกจ้างประจำ temp->ลูกจ้างชั่วคราว)", + length: 40, + default: null, + }) + employeeClass: string; } export class RegistryEmployeeCreateDto { @@ -340,7 +348,7 @@ export class RegistryEmployeeCreateDto { isRetirement?: boolean | null; leaveType?: string | null; posMasterNo?: string | null; - // orgRootId?: string | null; + orgRootId?: string | null; orgChild1Id?: string | null; orgChild2Id?: string | null; orgChild3Id?: string | null; @@ -372,4 +380,5 @@ export class RegistryEmployeeCreateDto { Educations?: string | null; educationLevels?: string | null; fields?: string | null; + employeeClass?: string | null; } \ No newline at end of file diff --git a/src/migration/1756364862810-update_registrymployere_add_field_employeeClass.ts b/src/migration/1756364862810-update_registrymployere_add_field_employeeClass.ts new file mode 100644 index 00000000..997ad8c5 --- /dev/null +++ b/src/migration/1756364862810-update_registrymployere_add_field_employeeClass.ts @@ -0,0 +1,14 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class UpdateRegistrymployereAddFieldEmployeeClass1756364862810 implements MigrationInterface { + name = 'UpdateRegistrymployereAddFieldEmployeeClass1756364862810' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`registryEmployee\` ADD \`employeeClass\` varchar(40) NULL COMMENT 'ประเภทลูกจ้าง (perm->ลูกจ้างประจำ temp->ลูกจ้างชั่วคราว)'`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE \`registryEmployee\` DROP COLUMN \`employeeClass\``); + } + +}