<?php

declare(strict_types=1);

namespace Database\Factories;

use App\Models\Log;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * Factory for generating Log test data.
 *
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Log>
 */
final class LogFactory extends Factory
{
    protected $model = Log::class;

    /**
     * Define the model's default state.
     */
    public function definition(): array
    {
        return [
            'user_id' => User::factory(),
            'action' => fake()->randomElement([
                'login',
                'logout',
                'session_started',
                'session_completed',
                'screening_started',
                'screening_completed',
            ]),
            'metadata' => null,
        ];
    }
}
