<?php

namespace Database\Factories;

use App\Models\Administrador;
use App\Models\CredencialProfesional;
use App\Models\Persona;
use Illuminate\Database\Eloquent\Factories\Factory;

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

    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'persona_id' => Persona::factory(),
            'dni' => (string) $this->faker->unique()->numberBetween(20000000, 45000000),
            'correo' => $this->faker->unique()->safeEmail(),
            'credencialprofesional_id' => CredencialProfesional::factory(),
        ];
    }
}
