<?php

namespace Database\Seeders;

use App\Models\Users;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;

class UsersSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        Users::insert([
            [
                'code' => 'admin',
                'full_name' => 'Admin',
                'username' => 'admin',
                'password' => Hash::make('admin'), // Hash::make used here
                'email' => '662000megala@gmail.com',
                'mobile' => '9361974629',
                'role_id' => 1,
                'level_id' => null,
                'status' => 'Active',
                'created_by' => 1,
                'created_at' => now(),
                'updated_at' => now()
            ],
            [
                'code' => 'EMP001',
                'full_name' => 'Varun',
                'username' => 'varun',
                'password' => Hash::make('varun'), // Hash::make used here
                'email' => '662000megala@gmail.com',
                'mobile' => '9361974629',
                'role_id' => 2,
                'level_id' => 1,
                'status' => 'Active',
                'created_by' => 1,
                'created_at' => now(),
                'updated_at' => now()
            ],
            [
                'code' => 'EMP002',
                'full_name' => 'Ravi',
                'username' => 'ravi',
                'password' => Hash::make('ravi'), // Hash::make used here
                'email' => '662000megala@gmail.com',
                'mobile' => '9361974629',
                'role_id' => 3,
                'level_id' => 2,
                'status' => 'Active',
                'created_by' => 1,
                'created_at' => now(),
                'updated_at' => now()
            ],
            [
                'code' => 'EMP003',
                'full_name' => 'Malar',
                'username' => 'malar',
                'password' => Hash::make('malar'), // Hash::make used here
                'email' => '662000megala@gmail.com',
                'mobile' => '9361974629',
                'role_id' => 4,
                'level_id' => 3,
                'status' => 'Active',
                'created_by' => 1,
                'created_at' => now(),
                'updated_at' => now()
            ]
            // [
            //     'code' => 'EMP004',
            //     'full_name' => 'Kavin',
            //     'username' => 'kavin',
            //     'password' => Hash::make('kavin'), // Hash::make used here
            //     'email' => '662000megala@gmail.com',
            //     'mobile' => '9361974629',
            //     'role_id' => 5,
            //     'level_id' => 4,     
            //     'status' => 'Active',  
            //     'created_by' => 1,
            //     'created_at' => now(),
            //     'updated_at' => now()
            // ]
        ]);
    }
}
// php artisan db:seed --class=UsersSeeder