<?php

namespace Database\Seeders;

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

class UserSeeder extends Seeder
{
    public function run(): void
    {
        // 1. Create Sample Normal Citizen Account
        User::updateOrCreate(
            ['email' => 'citizen@esqout.com'],
            [
                'name'     => 'John Ebi',
                'password' => Hash::make('password123'),
                'role'     => 'user',
                'phone'    => '+2348011112222',
            ]
        );

        // 2. Create Sample System Security Admin Account
        User::updateOrCreate(
            ['email' => 'admin@esqout.com'],
            [
                'name'     => 'Marcus Koru',
                'password' => Hash::make('admin123'),
                'role'     => 'admin',
                'phone'    => '+2348033334444',
            ]
        );

        // 3. Create Sample Emergency Security Agency Response Unit Account
        User::updateOrCreate(
            ['email' => 'responder@esqout.com'],
            [
                'name'     => 'Biogbolo Patrol Unit 4',
                'password' => Hash::make('agency123'),
                'role'     => 'agency',
                'phone'    => '+2348055556666',
            ]
        );
    }
}
