<?php

namespace App\Models;

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


class ModelAttribute extends Model
{
    protected $table = 'model_attributes';

    protected $fillable = [
        "name",
        "value"
    ];

    /**
     * Get the attributes that should be cast.
     *
     * @return array<string, string>
     */
    protected function casts(): array
    {
        return [
            "value" => "array",
        ];
    }

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

}
