<?php

declare(strict_types=1);

namespace Seka\Portal\Modul\Vzdelavanie\Models\Kurzy;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphMany;
use Seka\Portal\Modul\Vzdelavanie\Enums\ModelsTypeEnum;
use Seka\Portal\Modul\Vzdelavanie\Models\Popularita\Popularita;

/**
 * Class Kurz
 *
 * @package Seka\Portal\Modul\Vzdelavanie\Models\Kurzy
 */
final class Kurz extends Model
{
    /**
     * @return string
     */
    public static function type(): string
    {
        return ModelsTypeEnum::MODEL_TYPE_KURZY_KURZ->value;
    }

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

    /**
     * @return \Illuminate\Database\Eloquent\Relations\MorphMany
     */
    public function popularita(): MorphMany
    {
        return $this->morphMany(Popularita::class, 'popularita');
    }
}
