<?php

declare(strict_types=1);

namespace Seka\Vzdelavanie\Models\Testovanie;

use Illuminate\Database\Eloquent\Model;

/**
 * Class Test
 *
 * @package Seka\Vzdelavanie\Models\Testovanie
 */
class Test extends Model
{
    /**
     * @var string
     */
    protected $table = 'vzdelavanie_testovanie_testy';

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function kategoria()
    {
        return $this->belongsTo(Kategoria::class, 'testovanie_kategorie_id', 'id');
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function otazky()
    {
        return $this->hasMany(Otazka::class, 'testovanie_testy_id', 'id');
    }

    /**
     * @param string      $childType
     * @param mixed       $value
     * @param string|null $field
     *
     * @return \Illuminate\Database\Eloquent\Model|void|null
     */
    public function resolveChildRouteBinding($childType, $value, $field)
    {
        // TODO: Implement resolveChildRouteBinding() method.
    }
}
