const fs = require('fs');

const file = 'src/modules/book-generator/book-generator.store.ts';
let content = fs.readFileSync(file, 'utf8');

// Fix second occurrence
content = content.replace(
  'const created = await prisma.bookChapter.create({ {\n        bookId: bookIdNum,',
  'const created = await prisma.bookChapter.create({\n      data: {\n        bookId: bookIdNum,'
);

fs.writeFileSync(file, content, 'utf8');
console.log('✅ 第二次修复完成');
