import { PrismaClient } from '@prisma/client';

const prisma = new PrismaClient();

async function checkSlugs() {
  console.log("🔍 Checking League Slugs...");
  
  // En çok maçı olan ilk 50 ligin slug'ını getir
  const leagues = await prisma.league.findMany({
    where: { sport: 'football' },
    select: { name: true, competitionSlug: true, _count: { select: { matches: true } } },
    orderBy: { matches: { _count: 'desc' } },
    take: 50
  });

  leagues.forEach(l => {
    console.log(`Slug: '${l.competitionSlug}' | Name: '${l.name}' | Matches: ${l._count.matches}`);
  });
}

checkSlugs()
  .catch(e => console.error(e))
  .finally(async () => await prisma.$disconnect());
