import 'reflect-metadata';
import { AppDataSource } from './data-source';
import { seedQuests, nerfMonsterXp } from './quests-seed';

async function seed() {
  await AppDataSource.initialize();
  console.log('DB connectée (MySQL)');

  await seedQuests(AppDataSource);
  await nerfMonsterXp(AppDataSource);

  await AppDataSource.destroy();
  console.log('✅ Sprint 5 seed terminé');
}

seed().catch((err) => {
  console.error('Seed échoué :', err);
  process.exit(1);
});
