<?php

namespace Daylight\Core\Modules\PageBuilder\Models\Pivot;

use Illuminate\Database\Eloquent\Relations\MorphTo;
use Illuminate\Database\Eloquent\Relations\Pivot;

class Relatable extends Pivot
{
    protected $table = 'relatables';

    protected $fillable = [
        'component_id',
        'relatable_type',
        'relatable_id',
        'order',
    ];

    public function relatable(): MorphTo
    {
        return $this->morphTo();
    }
}
