import { MigrationInterface, QueryRunner } from 'typeorm';

export class CreateAdminTable1742778498009 implements MigrationInterface {
  public async up(queryRunner: QueryRunner): Promise<void> {
    // {
    //     'username': 'admin',
    //     'password': 'Admin@123'
    // }

    await queryRunner.query(`
            INSERT INTO admins (email, username, password, is_system_account) VALUES 
            ('admin@gmail.com', 'admin', '$2b$10$eF7K4Msw32e5ZC2cU78KgOqxMJygQcPDt5xXZP29inBBIV9KEsoyO', 1);
          `);
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(`
        DELETE FROM ktq_admins WHERE email = 'admin@gmail.com';
      `);
  }
}
