เพิ่มฟิว isProfile

This commit is contained in:
AdisakKanthawilang 2024-07-30 11:33:46 +07:00
parent 29527c512e
commit 02002a32a6
3 changed files with 21 additions and 0 deletions

View file

@ -2027,6 +2027,7 @@ export class DevelopmentController extends Controller {
dateStart: item.dateStart,
dateEnd: item.dateEnd,
isDone: item.isDone,
isProfile: item.isProfile,
}));
return new HttpSuccess(_getDevelopment);
}

View file

@ -215,6 +215,12 @@ export class DevelopmentHistory extends EntityBase {
default: false,
})
isDone: boolean;
@Column({
comment: "มีข้อมูลอยู่ในทะเบียนประวัติ",
default: false,
})
isProfile: boolean;
}
export class CreateDevelopmentHistory {
@Column()

View file

@ -0,0 +1,14 @@
import { MigrationInterface, QueryRunner } from "typeorm";
export class UpdateTableMigration073020241722313928787 implements MigrationInterface {
name = 'UpdateTableMigration073020241722313928787'
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`developmentHistory\` ADD \`isProfile\` tinyint NOT NULL COMMENT 'มีข้อมูลอยู่ในทะเบียนประวัติ' DEFAULT 0`);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE \`developmentHistory\` DROP COLUMN \`isProfile\``);
}
}