initial: standalone repo from monorepo split

This commit is contained in:
kevin-asprec
2026-04-13 09:37:07 +08:00
commit 5382f3b4e5
87 changed files with 5278 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
import { PrismaClient } from '../generated';
import * as bcrypt from 'bcrypt';
const prisma = new PrismaClient();
async function main() {
const password = await bcrypt.hash('SuperAdmin@123', 12);
const admin = await prisma.superAdmin.upsert({
where: { email: 'superadmin@fiberops.dev' },
update: {},
create: {
email: 'superadmin@fiberops.dev',
password,
firstName: 'Super',
lastName: 'Admin',
isActive: true,
},
});
console.log(`Seeded superadmin: ${admin.email}`);
}
main()
.catch((e) => {
console.error(e);
process.exit(1);
})
.finally(() => prisma.$disconnect());