<?php

declare(strict_types=1);

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;
use Seka\Vzdelavanie\Enums\ModelStatusEnum;
use Seka\Vzdelavanie\Models\Kniznica\Ucebnica;

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

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