16 lines
439 B
TypeScript
16 lines
439 B
TypeScript
import { PrismaClient } from '@prisma/client';
|
|
const prisma = new PrismaClient();
|
|
async function check() {
|
|
try {
|
|
const count = await prisma.businessCategory.count();
|
|
console.log('Category count:', count);
|
|
const cats = await prisma.businessCategory.findMany({take: 5});
|
|
console.log('Sample:', cats);
|
|
} catch (e: any) {
|
|
console.error('Error:', e.message);
|
|
} finally {
|
|
await prisma.$disconnect();
|
|
}
|
|
}
|
|
check();
|