<?php

declare(strict_types=1);

namespace Database\Factories;

use App\Models\Answer;
use App\Models\Question;
use App\Models\Session;
use Illuminate\Database\Eloquent\Factories\Factory;

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

    /**
     * Define the model's default state.
     */
    public function definition(): array
    {
        return [
            'session_id' => Session::factory(),
            'question_id' => Question::factory(),
            'value' => fake()->randomElement(['yes', 'no', 'not_applicable']),
            'text_value' => null,
        ];
    }
}
