Files
Content-Hunter_BE/test-query.ts
Harun CAN c3d2413003
Some checks failed
Backend Deploy 🚀 / build-and-deploy (push) Has been cancelled
main
2026-03-22 23:34:00 +03:00

24 lines
508 B
TypeScript

import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function main() {
const masterContents = await prisma.masterContent.findMany({
orderBy: { createdAt: 'desc' },
take: 5,
include: {
contents: true
}
});
console.log(JSON.stringify(masterContents, null, 2));
}
main()
.then(() => prisma.$disconnect())
.catch(e => {
console.error(e);
prisma.$disconnect();
process.exit(1);
});