Seed para usuário administrador default

This commit is contained in:
rochac2lee
2021-12-03 12:18:39 -03:00
parent 9a4cf33c24
commit 9eac6be8af

View File

@@ -0,0 +1,25 @@
import { QueryInterface } from "sequelize";
module.exports = {
up: (queryInterface: QueryInterface) => {
return queryInterface.bulkInsert(
"Users",
[
{
name: "Administrador",
email: "admin@whaticket.com",
passwordHash: "$2a$08$WaEmpmFDD/XkDqorkpQ42eUZozOqRCPkPcTkmHHMyuTGUOkI8dHsq",
profile: "admin",
tokenVersion: 0,
createdAt: new Date(),
updatedAt: new Date()
}
],
{}
);
},
down: (queryInterface: QueryInterface) => {
return queryInterface.bulkDelete("Users", {});
}
};