librenms/app/Models/PortsFdb.php
2021-03-30 11:14:34 +02:00

25 lines
549 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class PortsFdb extends PortRelatedModel
{
protected $table = 'ports_fdb';
protected $primaryKey = 'ports_fdb_id';
public $timestamps = true;
// ---- Define Relationships ----
public function device(): BelongsTo
{
return $this->belongsTo(\App\Models\Device::class, 'device_id', 'device_id');
}
public function vlan(): BelongsTo
{
return $this->belongsTo(\App\Models\Vlan::class, 'vlan_id', 'vlan_id');
}
}