<?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 Lekcia
 *
 * @package Seka\Portal\Modul\Vzdelavanie\Models\Kurzy
 */
final class Lekcia extends Model
{
    /**
     * @return string
     */
    public static function type(): string
    {
        return ModelsTypeEnum::MODEL_TYPE_KURZY_LEKCIA->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');
    }
}
