<?php

namespace Database\Factories;

use App\Models\AdminUser; 

use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;

use Carbon\Carbon;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\AdminUser>
 */
class AdminUserFactory extends Factory
{
    /**
     * The name of the factory's corresponding model 
     * 
     * @var string 
     */
    protected $model    =   AdminUser::class; 

    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'first_name'        => $this->faker->firstName(),
            'last_name'         => $this->faker->lastName(),
            'password'          => Hash::make('123456789'),
            'email_address'     => $this->faker->email(),
            'email_verified_at' => Carbon::now(),
            'is_active'         => true,
            'role'              => $this->faker->randomElement(['Admin', 'Superadmin']),
            'phone_num'         => $this->faker->phoneNumber(),
        ];
    }
}
