import { PrismaClient } from '@prisma/client'; import * as bcrypt from 'bcrypt'; const prisma = new PrismaClient(); async function main() { const passwordHash = await bcrypt.hash('admin123', 10); const user = await prisma.user.upsert({ where: { email: 'admin@edr-platform.com' }, update: { passwordHash, role: 'ADMIN' }, create: { fullName: 'EDR Admin', email: 'admin@edr-platform.com', phone: '+251900000000', passwordHash, role: 'ADMIN' }, }); console.log('✅ Admin ready:', user.email); } main().catch(console.error).finally(() => prisma.$disconnect());