2021-06-11 00:42:34 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* IsisAdjacency.php
|
|
|
|
*
|
|
|
|
* -Description-
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
* @link http://librenms.org
|
2021-09-10 18:09:53 +00:00
|
|
|
*
|
2021-06-11 00:42:34 +00:00
|
|
|
* @copyright 2021 Otto Reinikainen
|
|
|
|
* @author Otto Reinikainen <otto@ottorei.fi>
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
2021-08-24 02:19:55 +00:00
|
|
|
use LibreNMS\Interfaces\Models\Keyable;
|
2021-06-11 00:42:34 +00:00
|
|
|
|
2021-08-24 02:19:55 +00:00
|
|
|
class IsisAdjacency extends PortRelatedModel implements Keyable
|
2021-06-11 00:42:34 +00:00
|
|
|
{
|
|
|
|
use HasFactory;
|
|
|
|
|
|
|
|
//public $primaryKey = 'id';
|
|
|
|
public $timestamps = false;
|
|
|
|
|
|
|
|
protected $fillable = [
|
|
|
|
'device_id',
|
2022-04-08 21:33:41 +00:00
|
|
|
'index',
|
2021-06-11 00:42:34 +00:00
|
|
|
'port_id',
|
|
|
|
'ifIndex',
|
2021-08-24 02:19:55 +00:00
|
|
|
'isisCircAdminState',
|
2021-06-11 00:42:34 +00:00
|
|
|
'isisISAdjState',
|
|
|
|
'isisISAdjNeighSysType',
|
|
|
|
'isisISAdjNeighSysID',
|
|
|
|
'isisISAdjNeighPriority',
|
|
|
|
'isisISAdjLastUpTime',
|
|
|
|
'isisISAdjAreaAddress',
|
|
|
|
'isisISAdjIPAddrType',
|
|
|
|
'isisISAdjIPAddrAddress',
|
|
|
|
];
|
|
|
|
|
|
|
|
// ---- Define Relationships ----
|
|
|
|
|
|
|
|
public function device()
|
|
|
|
{
|
|
|
|
return $this->belongsTo(\App\Models\Port::class, 'device_id');
|
|
|
|
}
|
2021-08-24 02:19:55 +00:00
|
|
|
|
|
|
|
public function getCompositeKey()
|
|
|
|
{
|
2022-04-08 21:33:41 +00:00
|
|
|
return $this->ifIndex . $this->index;
|
2021-08-24 02:19:55 +00:00
|
|
|
}
|
2021-06-11 00:42:34 +00:00
|
|
|
}
|