Merge branch 'adiDev' into develop

This commit is contained in:
Adisak 2025-11-03 17:36:02 +07:00
commit d6383ec2c4
2 changed files with 21 additions and 0 deletions

View file

@ -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[];

View file

@ -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\``);
}
}