Files
librenms-librenms/app/Models/PortsFdb.php
PipoCanaja e2f835ad9d FDB table with history capabilities (#9804)
* Migration script and data feeding

* Adding the columns in the GUI

* build schema

* update FDB test data

* Use of timestamps()

* ignore created_at and updated_at in tests, and regenerate test impacted

* daily.sh does the cleaning

* space cleaning codeclimate

* Use carbon instead of str-val

* handle when $fdb_entry->updated_at and created at are null

* handle when $fdb_entry->updated_at and created at are null (force travis rerun)

* Doc update

* Doc update
2019-02-21 13:23:01 +01:00

23 lines
460 B
PHP

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