isReserve ว่างได้
This commit is contained in:
parent
93d4ffa7a6
commit
24744f7f32
3 changed files with 28 additions and 8 deletions
|
|
@ -668,10 +668,10 @@ export class SalaryPeriodController extends Controller {
|
|||
@Path() id: string,
|
||||
@Body()
|
||||
body: {
|
||||
isPunish: boolean;
|
||||
isSuspension: boolean;
|
||||
isAbsent: boolean;
|
||||
isLeave: boolean;
|
||||
isPunish: any;
|
||||
isSuspension: any;
|
||||
isAbsent: any;
|
||||
isLeave: any;
|
||||
},
|
||||
@Request() request: { user: Record<string, any> },
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -248,28 +248,28 @@ export class SalaryProfile extends EntityBase {
|
|||
@Column({
|
||||
nullable: true,
|
||||
comment: "การลงโทษทางวินัย",
|
||||
default: false,
|
||||
default: null,
|
||||
})
|
||||
isPunish: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "พักราชการ",
|
||||
default: false,
|
||||
default: null,
|
||||
})
|
||||
isSuspension: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ขาดราชการ",
|
||||
default: false,
|
||||
default: null,
|
||||
})
|
||||
isAbsent: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "วันลา",
|
||||
default: false,
|
||||
default: null,
|
||||
})
|
||||
isLeave: boolean;
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableSalaryProfileIsPunishNullable1709802836209 implements MigrationInterface {
|
||||
name = 'UpdateTableSalaryProfileIsPunishNullable1709802836209'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` CHANGE \`isPunish\` \`isPunish\` tinyint NULL COMMENT 'การลงโทษทางวินัย'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` CHANGE \`isSuspension\` \`isSuspension\` tinyint NULL COMMENT 'พักราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` CHANGE \`isAbsent\` \`isAbsent\` tinyint NULL COMMENT 'ขาดราชการ'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` CHANGE \`isLeave\` \`isLeave\` tinyint NULL COMMENT 'วันลา'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` CHANGE \`isLeave\` \`isLeave\` tinyint NULL COMMENT 'วันลา' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` CHANGE \`isAbsent\` \`isAbsent\` tinyint NULL COMMENT 'ขาดราชการ' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` CHANGE \`isSuspension\` \`isSuspension\` tinyint NULL COMMENT 'พักราชการ' DEFAULT '0'`);
|
||||
await queryRunner.query(`ALTER TABLE \`salaryProfile\` CHANGE \`isPunish\` \`isPunish\` tinyint NULL COMMENT 'การลงโทษทางวินัย' DEFAULT '0'`);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue