const bcrypt = require('bcrypt');
const { v4: uuidv4 } = require('uuid');

module.exports = {
  up: async (queryInterface) => {
    const hashedPassword = await bcrypt.hash('adminsealspolinema24', 10);
    await queryInterface.bulkInsert('users', [
      {
        ID: uuidv4(),
        NAME_USERS: 'Administrator',
        EMAIL: 'adminseals@gmail.com',
        PASSWORD: hashedPassword,
        ROLE: 'admin',
        TIME_USERS: new Date(),
      },
    ]);
  },
  down: async (queryInterface) => {
    await queryInterface.bulkDelete('users', { EMAIL: 'adminseals@gmail.com' });
  },
};