| 1234567891011121314 |
- const { PrismaClient } = require('@prisma/client');
- const p = new PrismaClient();
- (async () => {
- const bs = await p.book.findMany({ where: { OR: [{ id: 80 }, { id: 81 }, { id: 82 }] } });
- for (const b of bs) {
- const chs = await p.bookChapter.findMany({ where: { bookId: b.id } });
- const auds = await p.audioRecord.findMany({ where: { bookId: b.id } });
- console.log(`book ${b.id} '${b.title}' ch=${chs.length} audio=${auds.length}`);
- for (const a of auds.slice(0, 3)) {
- console.log(` audio#${a.id} status=${a.status} voice=${a.voiceId} url=${(a.audioUrl||'').slice(-50)}`);
- }
- }
- await p.$disconnect();
- })();
|