text: 'use strict';
  
  const bcrypt = require('bcrypt');
  const config = require('../config/server.json');
  const params = require('../config/params.json');
  
  module.exports = {
    up: (queryInterface, Sequelize) => {
      return queryInterface.bulkInsert('users', [
        {
          name: 'The Admin',
          email: 'admin@crate.com',
          password: bcrypt.hashSync('123456', config.saltRounds),
          role: params.user.roles.admin,
          createdAt: new Date(),
          updatedAt: new Date()
        },
        {
          name: 'User with kept deliveries',
          email: 'user1@crate.com',
          password: bcrypt.hashSync('123456', config.saltRounds),
          role: params.user.roles.user,
          createdAt: new Date(),
          updatedAt: new Date()
        },
        {
          name: 'User with returned deliveries',
          email: 'user2@crate.com',
          password: bcrypt.hashSync('123456', config.saltRounds),
          role: params.user.roles.user,
          createdAt: new Date(),
          updatedAt: new Date()
        }
      ])
    },
  
    down: (queryInterface, Sequelize) => {
      return queryInterface.bulkDelete('users', null, {});
    }
  }
  