<?php

use App\Classes\ValueObjects\Constants\Roles;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;

class UsersTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {

        DB::table('users')->insert([
            [
                'name' => 'Omair Saleh',
                'email' => 'omair@izyim.com',
                'password' => Hash::make('123456abcabc'),
                'email_verified_at' => \Carbon\Carbon::now(),
                'role_id' => Roles::SUPER_ADMIN,
                'created_at' =>  \Carbon\Carbon::now(),
                'updated_at' => \Carbon\Carbon::now()
            ],
            [
                'name' => 'CIEF Worldwide',
                'email' => 'admin@cief-malaysia.com',
                'password' => Hash::make('123456abcabc'),
                'email_verified_at' => \Carbon\Carbon::now(),
                'role_id' => Roles::ADMIN,
                'created_at' =>  \Carbon\Carbon::now(),
                'updated_at' => \Carbon\Carbon::now()
            ],
            [
                'name' => 'Marketing Department',
                'email' => 'marketing@izyim.com',
                'password' => Hash::make('123456abcabc'),
                'email_verified_at' => \Carbon\Carbon::now(),
                'role_id' => Roles::ADMIN,
                'created_at' =>  \Carbon\Carbon::now(),
                'updated_at' => \Carbon\Carbon::now()
            ],
            [
                'name' => 'Front End Shipping Admin',
                'email' => 'fe@izyim.com',
                'password' => Hash::make('123456abcabc'),
                'email_verified_at' => \Carbon\Carbon::now(),
                'role_id' => Roles::ADMIN,
                'created_at' =>  \Carbon\Carbon::now(),
                'updated_at' => \Carbon\Carbon::now()
            ]
        ]);

        if (app()->environment('local'))
            factory(App\Models\User::class, 30)->create();
    }
}
