<?php

declare(strict_types=1);

namespace Seka\Vzdelavanie\Models\Testovanie;

use Illuminate\Database\Eloquent\Model;

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

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

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function odpovede()
    {
        return $this->hasMany(Odpoved::class, 'testovanie_otazky_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.
    }
}
