20 lines
488 B
TypeScript
20 lines
488 B
TypeScript
import { PrismaClient } from '@prisma/client';
|
|
|
|
async function main() {
|
|
const prisma = new PrismaClient();
|
|
const logs = await prisma.whatsappLog.findMany({
|
|
orderBy: { createdAt: 'desc' },
|
|
take: 10
|
|
});
|
|
const templates = await prisma.whatsappTemplate.findMany();
|
|
|
|
console.log('--- TEMPLATES ---');
|
|
console.log(JSON.stringify(templates, null, 2));
|
|
console.log('--- LOGS ---');
|
|
console.log(JSON.stringify(logs, null, 2));
|
|
|
|
await prisma.$disconnect();
|
|
}
|
|
|
|
main();
|