metallkart-erp/scripts/seed-help.ts
2026-05-10 23:23:52 +03:00

16 lines
444 B
TypeScript

import { PrismaClient } from '@prisma/client';
import { seedHelpArticles } from '../src/modules/help/help.seed.js';
async function main() {
const prisma = new PrismaClient();
try {
await seedHelpArticles(prisma);
const count = await prisma.helpArticle.count();
console.log(`Seed OK: ${count} help articles in DB`);
} finally {
await prisma.$disconnect();
}
}
main().catch(e => { console.error(e); process.exit(1); });