tmp-book43-info.js 373 B

12345678910111213
  1. const { PrismaClient } = require('@prisma/client');
  2. const p = new PrismaClient();
  3. (async () => {
  4. const b = await p.book.findUnique({
  5. where: { id: 43 },
  6. select: {
  7. id: true, title: true, description: true, bookScale: true,
  8. userId: true, genStage: true, progress: true
  9. }
  10. });
  11. console.log(JSON.stringify(b, null, 2));
  12. await p.$disconnect();
  13. })();