<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class TopologyPort extends Model
{
    protected $guarded = ['id'];

    protected function casts(): array
    {
        return ['metadata' => 'array'];
    }

    public function node()
    {
        return $this->belongsTo(TopologyNode::class, 'node_id');
    }
}
