import { PrismaClient } from '@prisma/client'; const prisma = new PrismaClient(); async function checkNotebooksCover() { try { const userId = 'def0ffdc-d078-490c-b713-6462d1027a77'; console.log('=== 检查用户笔记本封面 ==='); const notebooks = await prisma.notebook.findMany({ where: { userId }, }); console.log(`找到 ${notebooks.length} 个笔记本\n`); for (const notebook of notebooks) { console.log(`ID: ${notebook.id}`); console.log(`标题: ${notebook.title}`); console.log(`封面: ${notebook.coverImage || 'null'}`); console.log('---'); } } catch (error) { console.error('错误:', error); } finally { await prisma.$disconnect(); } } checkNotebooksCover();