Merge branch 'develop' of github.com:Frappet/hrms-api-org into develop

This commit is contained in:
kittapath 2024-12-06 18:06:36 +07:00
commit 2c60dd7a6c
8 changed files with 88 additions and 0 deletions

View file

@ -67,6 +67,14 @@ export class CommandRecive extends EntityBase {
})
amount: Double;
@Column({
comment: "เงินพิเศษ",
default: 0,
nullable: true,
type: "double",
})
amountSpecial: Double;
@Column({
comment: "เงินประจำตำแหน่ง",
default: 0,

View file

@ -80,6 +80,12 @@ export class CommandType extends EntityBase {
})
isAttachment: boolean;
@Column({
comment: "สถานะแก้ไขเงินเดือน",
default: true,
})
isSalary: boolean;
@Column({
nullable: true,
comment: "คำอธิบาย",

View file

@ -339,6 +339,14 @@ export class Profile extends EntityBase {
})
amount: Double;
@Column({
comment: "เงินพิเศษ",
default: 0,
nullable: true,
type: "double",
})
amountSpecial: Double;
@Column({
comment: "เงินประจำตำแหน่ง",
default: 0,

View file

@ -592,6 +592,14 @@ export class ProfileEmployee extends EntityBase {
})
amount: Double;
@Column({
comment: "เงินพิเศษ",
default: 0,
nullable: true,
type: "double",
})
amountSpecial: Double;
@Column({
comment: "เงินประจำตำแหน่ง",
default: 0,

View file

@ -95,6 +95,14 @@ export class ProfileSalary extends EntityBase {
})
amount: Double;
@Column({
comment: "เงินพิเศษ",
default: 0,
nullable: true,
type: "double",
})
amountSpecial: Double;
@Column({
comment: "เงินประจำตำแหน่ง",
default: 0,

View file

@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableProfileSalaryAddAmountSpecial1733463321778 implements MigrationInterface {
name = 'UpdateTableProfileSalaryAddAmountSpecial1733463321778'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileSalary\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileSalary\` DROP COLUMN \`amountSpecial\``);
}
}

View file

@ -0,0 +1,22 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class Update3table_addAmountSpecial1733471256767 implements MigrationInterface {
name = 'Update3table_addAmountSpecial1733471256767'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileEmployee\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
await queryRunner.query(`ALTER TABLE \`commandRecive\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
await queryRunner.query(`ALTER TABLE \`profile\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
await queryRunner.query(`ALTER TABLE \`profileHistory\` ADD \`amountSpecial\` double NULL COMMENT 'เงินพิเศษ' DEFAULT '0'`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`profileHistory\` DROP COLUMN \`amountSpecial\``);
await queryRunner.query(`ALTER TABLE \`profile\` DROP COLUMN \`amountSpecial\``);
await queryRunner.query(`ALTER TABLE \`commandRecive\` DROP COLUMN \`amountSpecial\``);
await queryRunner.query(`ALTER TABLE \`profileEmployeeHistory\` DROP COLUMN \`amountSpecial\``);
await queryRunner.query(`ALTER TABLE \`profileEmployee\` DROP COLUMN \`amountSpecial\``);
}
}

View file

@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableCommandTypeAddIsSalary1733482389096 implements MigrationInterface {
name = 'UpdateTableCommandTypeAddIsSalary1733482389096'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`commandType\` ADD \`isSalary\` tinyint NOT NULL COMMENT 'สถานะแก้ไขเงินเดือน' DEFAULT 1`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`commandType\` DROP COLUMN \`isSalary\``);
}
}