Merge branch 'develop' into adiDev
This commit is contained in:
commit
d1fbd59e5f
4 changed files with 47 additions and 1 deletions
|
|
@ -73,7 +73,7 @@ export class AuthRoleAttr extends EntityBase {
|
|||
comment: "Root",
|
||||
default: null,
|
||||
})
|
||||
parentNode?: string | null;
|
||||
parentNode?: string;
|
||||
|
||||
// @ManyToOne(() => AuthSys, (authSys) => authSys.authSys)
|
||||
// @JoinColumn({ name: "authSysId" })
|
||||
|
|
|
|||
|
|
@ -87,6 +87,18 @@ export class EmployeePosMaster extends EntityBase {
|
|||
})
|
||||
isSit: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "เป็นผู้อำนวยการ",
|
||||
default: false,
|
||||
})
|
||||
isDirector: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "เป็นเจ้าหน้าที่",
|
||||
default: false,
|
||||
})
|
||||
isOfficer: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "หมายเหตุ",
|
||||
|
|
|
|||
|
|
@ -86,6 +86,18 @@ export class PosMaster extends EntityBase {
|
|||
})
|
||||
isSit: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "เป็นผู้อำนวยการ",
|
||||
default: false,
|
||||
})
|
||||
isDirector: boolean;
|
||||
|
||||
@Column({
|
||||
comment: "เป็นเจ้าหน้าที่",
|
||||
default: false,
|
||||
})
|
||||
isOfficer: boolean;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "หมายเหตุ",
|
||||
|
|
|
|||
22
src/migration/1718163843179-update_table_role_add_node.ts
Normal file
22
src/migration/1718163843179-update_table_role_add_node.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class UpdateTableRoleAddNode1718163843179 implements MigrationInterface {
|
||||
name = 'UpdateTableRoleAddNode1718163843179'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`employeePosMaster\` ADD \`isDirector\` tinyint NOT NULL COMMENT 'เป็นผู้อำนวยการ' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`employeePosMaster\` ADD \`isOfficer\` tinyint NOT NULL COMMENT 'เป็นเจ้าหน้าที่' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`posMaster\` ADD \`isDirector\` tinyint NOT NULL COMMENT 'เป็นผู้อำนวยการ' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`posMaster\` ADD \`isOfficer\` tinyint NOT NULL COMMENT 'เป็นเจ้าหน้าที่' DEFAULT 0`);
|
||||
await queryRunner.query(`ALTER TABLE \`authRoleAttr\` ADD \`parentNode\` varchar(255) NULL COMMENT 'Root'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`authRoleAttr\` DROP COLUMN \`parentNode\``);
|
||||
await queryRunner.query(`ALTER TABLE \`posMaster\` DROP COLUMN \`isOfficer\``);
|
||||
await queryRunner.query(`ALTER TABLE \`posMaster\` DROP COLUMN \`isDirector\``);
|
||||
await queryRunner.query(`ALTER TABLE \`employeePosMaster\` DROP COLUMN \`isOfficer\``);
|
||||
await queryRunner.query(`ALTER TABLE \`employeePosMaster\` DROP COLUMN \`isDirector\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue