Merge branch 'adiDev' into develop
This commit is contained in:
commit
d6383ec2c4
2 changed files with 21 additions and 0 deletions
|
|
@ -23,6 +23,13 @@ export class AuthRole extends EntityBase {
|
|||
})
|
||||
roleDescription: string;
|
||||
|
||||
@Column({
|
||||
nullable: true,
|
||||
comment: "ข้อมูลที่ role admin สามารถเห็นได้",
|
||||
default: null,
|
||||
})
|
||||
isAdminVisibled: boolean;
|
||||
|
||||
@OneToMany(() => AuthRoleAttr, (authRoleAttr) => authRoleAttr.authRoleAttrForRole)
|
||||
authRoles: AuthRoleAttr[];
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class AddFieldIsAdminVisibledTableAuthRole1762165716863 implements MigrationInterface {
|
||||
name = 'AddFieldIsAdminVisibledTableAuthRole1762165716863'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`authRole\` ADD \`isAdminVisibled\` tinyint NULL COMMENT 'ข้อมูลที่ role admin สามารถเห็นได้'`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE \`authRole\` DROP COLUMN \`isAdminVisibled\``);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue