Initial commit: CMS completo com gerenciamento de leads e personalização de tema

This commit is contained in:
Erik
2025-11-26 14:09:21 -03:00
commit aaa1709e41
106 changed files with 26268 additions and 0 deletions

32
frontend/prisma/seed.js Normal file
View File

@@ -0,0 +1,32 @@
const { PrismaClient } = require('../src/generated/client');
const bcrypt = require('bcryptjs');
const prisma = new PrismaClient();
async function main() {
const email = 'admin@occto.com';
const password = 'admin'; // Senha inicial simples
const hashedPassword = await bcrypt.hash(password, 10);
const user = await prisma.user.upsert({
where: { email },
update: {},
create: {
email,
name: 'Admin Occto',
password: hashedPassword,
},
});
console.log({ user });
}
main()
.then(async () => {
await prisma.$disconnect();
})
.catch(async (e) => {
console.error(e);
await prisma.$disconnect();
process.exit(1);
});