check-fields.ts 548 B

123456789101112131415
  1. import { PrismaClient } from '@prisma/client';
  2. const prisma = new PrismaClient();
  3. async function main() {
  4. try {
  5. const ch = await prisma.bookChapter.findUnique({ where: { id: 3502 } });
  6. console.log('ch3502 status:', ch?.status);
  7. console.log('ch3502 genStage:', ch?.genStage);
  8. const b = await prisma.book.findUnique({ where: { id: 139 } });
  9. console.log('b139 status:', b?.status);
  10. console.log('b139 genStage:', b?.genStage);
  11. } catch(e) {
  12. console.error('Error:', e.message);
  13. }
  14. }
  15. main().finally(() => process.exit(0));