This commit is contained in:
AnandaTon 2024-05-17 10:11:40 +07:00
commit 0f217da42c
2 changed files with 28 additions and 0 deletions

View file

@ -198,6 +198,14 @@ export class ProfileEmployee extends EntityBase {
})
telephoneNumber: string;
@Column({
nullable: true,
comment: "สัญชาติ",
length: 255,
default: null,
})
nationality: string;
@Column({
nullable: true,
comment: "เพศ",
@ -441,6 +449,7 @@ export class CreateProfileEmployee {
// religion: string | null;
posLevelId: string | null;
posTypeId: string | null;
// nationality: string | null;
// gender: string | null;
// relationship: string | null;
// bloodGroup: string | null;
@ -464,6 +473,7 @@ export type UpdateProfileEmployee = {
religion: string | null;
posLevelId?: string | null;
posTypeId?: string | null;
nationality?: string | null;
gender?: string | null;
relationship?: string | null;
bloodGroup?: string | null;

View file

@ -0,0 +1,18 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableProfileSalaryHistoryDeleteProfileId11715914699824 implements MigrationInterface {
name = 'UpdateTableProfileSalaryHistoryDeleteProfileId11715914699824'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileEmployee\` ADD \`nationality\` varchar(255) NULL COMMENT 'สัญชาติ'`);
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`nationality\` varchar(255) NULL COMMENT 'สัญชาติ'`);
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD CONSTRAINT \`FK_f5758428d496b6d2a051c8af92b\` FOREIGN KEY (\`profileEmployeeId\`) REFERENCES \`profileEmployee\`(\`id\`) ON DELETE NO ACTION ON UPDATE NO ACTION`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP FOREIGN KEY \`FK_f5758428d496b6d2a051c8af92b\``);
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`nationality\``);
await queryRunner.query(`ALTER TABLE \`profileEmployee\` DROP COLUMN \`nationality\``);
}
}