เพิ่มฟิลด์
This commit is contained in:
parent
9bf7ddf267
commit
94771726aa
3 changed files with 124 additions and 0 deletions
|
|
@ -365,6 +365,46 @@ export class Profile extends EntityBase {
|
|||
})
|
||||
mouthSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "ไอดีคำสั่งพ้นจากราชการ",
|
||||
default: null,
|
||||
})
|
||||
leaveCommandId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 255,
|
||||
comment: "เลขที่คำสั่งพ้นจากราชการ",
|
||||
default: null,
|
||||
})
|
||||
leaveCommandNo: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "หมายเหตุแนวตั้งคำสั่งพ้นจากราชการ",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
leaveRemark: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "datetime",
|
||||
comment: "วันที่ลงนามคำสั่งพ้นจากราชการ",
|
||||
default: null,
|
||||
})
|
||||
leaveDate: Date | null;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "text",
|
||||
comment: "ประเภทพ้นคำสั่งพ้นจากราชการ",
|
||||
default: null,
|
||||
})
|
||||
leaveType: string;
|
||||
|
||||
@OneToMany(() => PosMaster, (posMaster) => posMaster.current_holder)
|
||||
current_holders: PosMaster[];
|
||||
|
||||
|
|
|
|||
|
|
@ -616,6 +616,46 @@ export class ProfileEmployee extends EntityBase {
|
|||
})
|
||||
mouthSalaryAmount: Double;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 40,
|
||||
comment: "ไอดีคำสั่งพ้นจากราชการ",
|
||||
default: null,
|
||||
})
|
||||
leaveCommandId: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
length: 255,
|
||||
comment: "เลขที่คำสั่งพ้นจากราชการ",
|
||||
default: null,
|
||||
})
|
||||
leaveCommandNo: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "หมายเหตุแนวตั้งคำสั่งพ้นจากราชการ",
|
||||
type: "text",
|
||||
default: null,
|
||||
})
|
||||
leaveRemark: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "datetime",
|
||||
comment: "วันที่ลงนามคำสั่งพ้นจากราชการ",
|
||||
default: null,
|
||||
})
|
||||
leaveDate: Date | null;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
type: "text",
|
||||
comment: "ประเภทพ้นคำสั่งพ้นจากราชการ",
|
||||
default: null,
|
||||
})
|
||||
leaveType: string;
|
||||
|
||||
@OneToMany(() => ProfileEmployeeInformationHistory, (v) => v.profileEmployeeInformation)
|
||||
information_histories: ProfileEmployeeInformationHistory[];
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableProfileAndProfileEmp1737951091780 implements MigrationInterface {
|
||||
name = 'UpdateTableProfileAndProfileEmp1737951091780'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployee\` ADD \`leaveType\` text NULL COMMENT 'ประเภทพ้นคำสั่งพ้นจากราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`leaveCommandId\` varchar(40) NULL COMMENT 'ไอดีคำสั่งพ้นจากราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`leaveCommandNo\` varchar(255) NULL COMMENT 'เลขที่คำสั่งพ้นจากราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`leaveRemark\` text NULL COMMENT 'หมายเหตุแนวตั้งคำสั่งพ้นจากราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`leaveDate\` datetime NULL COMMENT 'วันที่ลงนามคำสั่งพ้นจากราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`leaveType\` text NULL COMMENT 'ประเภทพ้นคำสั่งพ้นจากราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` ADD \`leaveCommandId\` varchar(40) NULL COMMENT 'ไอดีคำสั่งพ้นจากราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` ADD \`leaveCommandNo\` varchar(255) NULL COMMENT 'เลขที่คำสั่งพ้นจากราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` ADD \`leaveRemark\` text NULL COMMENT 'หมายเหตุแนวตั้งคำสั่งพ้นจากราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` ADD \`leaveDate\` datetime NULL COMMENT 'วันที่ลงนามคำสั่งพ้นจากราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` ADD \`leaveType\` text NULL COMMENT 'ประเภทพ้นคำสั่งพ้นจากราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` ADD \`leaveCommandId\` varchar(40) NULL COMMENT 'ไอดีคำสั่งพ้นจากราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` ADD \`leaveCommandNo\` varchar(255) NULL COMMENT 'เลขที่คำสั่งพ้นจากราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` ADD \`leaveRemark\` text NULL COMMENT 'หมายเหตุแนวตั้งคำสั่งพ้นจากราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` ADD \`leaveDate\` datetime NULL COMMENT 'วันที่ลงนามคำสั่งพ้นจากราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` ADD \`leaveType\` text NULL COMMENT 'ประเภทพ้นคำสั่งพ้นจากราชการ'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` DROP COLUMN \`leaveType\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` DROP COLUMN \`leaveDate\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` DROP COLUMN \`leaveRemark\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` DROP COLUMN \`leaveCommandNo\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileHistory\` DROP COLUMN \`leaveCommandId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` DROP COLUMN \`leaveType\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` DROP COLUMN \`leaveDate\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` DROP COLUMN \`leaveRemark\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` DROP COLUMN \`leaveCommandNo\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profile\` DROP COLUMN \`leaveCommandId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`leaveType\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`leaveDate\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`leaveRemark\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`leaveCommandNo\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`leaveCommandId\``);
|
||||
await queryRunner.query(`ALTER TABLE \`profileEmployee\` DROP COLUMN \`leaveType\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue