const { PrismaClient } = require('@prisma/client');
const prisma = new PrismaClient();

async function clean() {
  const result = await prisma.book.deleteMany({
    where: { status: 'generating' }
  });
  console.log(`✅ 已清理 ${result.count} 本生成中的书`);
  await prisma.$disconnect();
}

clean();
