Commit inicial - upload de todos os arquivos da pasta

This commit is contained in:
2026-06-13 16:36:29 -03:00
commit 807be1c5ee
275 changed files with 29408 additions and 0 deletions

30
prisma/seed-admin.ts Normal file
View File

@@ -0,0 +1,30 @@
import { PrismaClient } from '@prisma/client';
import * as bcrypt from 'bcrypt';
const prisma = new PrismaClient();
async function main() {
const password = await bcrypt.hash('Admin@123456', 10);
const user = await prisma.user.upsert({
where: { email: 'admin@iasis.com.br' },
update: {},
create: {
name: 'Administrador',
email: 'admin@iasis.com.br',
password,
role: 'ADMIN',
isActive: true,
mustChangePassword: true,
},
});
console.log('Usuário admin criado:', user.email);
}
main()
.catch((e) => {
console.error(e);
process.exit(1);
})
.finally(() => prisma.$disconnect());