feat: initial commit - Moraworld Imports project

This commit is contained in:
Lizandro Guarnizo
2026-06-01 08:06:40 -05:00
commit 094ea9cf81
47 changed files with 12844 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
import { PrismaClient, UserRole } from "@prisma/client";
const prisma = new PrismaClient();
async function main() {
const tenant = await prisma.tenant.upsert({
where: { slug: "moraworld" },
update: {},
create: {
slug: "moraworld",
name: "Moraworld Imports",
},
});
console.log("✓ Tenant:", tenant.slug);
const suiteCode = "EC-00001";
const demoEmail = "demo@moraworld.test";
const existing = await prisma.user.findUnique({
where: { tenantId_email: { tenantId: tenant.id, email: demoEmail } },
});
if (!existing) {
console.log(" Usuario demo se creará en Fase 1 (auth con bcrypt)");
}
console.log("✓ Seed completado");
}
main()
.catch((e) => {
console.error(e);
process.exit(1);
})
.finally(() => prisma.$disconnect());