<?php

declare(strict_types=1);

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;
use Seka\Vzdelavanie\Enums\ModelStatusEnum;
use Seka\Vzdelavanie\Models\Testovanie\Test;

/**
 * Class TestovanieTestFactory
 *
 * @package Database\Factories
 */
class TestovanieTestFactory extends Factory {
    /**
     * @var string
     */
    protected $model = Test::class;

    /**
     * @return array
     */
    public function definition(): array
    {
        return [
            'nazov' => $this->faker->realText(20),
            'popis' => $this->faker->realText(100),
            'pocet_otazok' => rand(5, 30),
            'stav' => rand(0, 1) == 1 ? ModelStatusEnum::PUBLIKOVANE() : ModelStatusEnum::NEPUBLIKOVANE(),
        ];
    }
}
