<?php

namespace Database\Factories;

use App\Models\AccionLog;
use App\Models\LogSeguridad;
use App\Models\Persona;
use Illuminate\Database\Eloquent\Factories\Factory;

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

    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'descripcion' => $this->faker->sentence(),
            'fechahora' => $this->faker->dateTimeBetween('-1 month', 'now'),
            'IPorigen' => $this->faker->ipv4(),
            'rol' => $this->faker->randomElement(['Cliente', 'Profesional', 'Administrador']),
            'accion_id' => AccionLog::factory(),
            'persona_id' => Persona::factory(),
        ];
    }
}
