Files
librenms-librenms/app/Models/MplsService.php
Vitali Kari 1de640c3aa MPLS Services (#10421)
* initial database migrations

* first part, discovery

* second part, polling

* add SAP polling and discovery

* style checks

* rename variables in more generic way

* html global pages for sdp and sdp binds

* add Services and SAPs

* port links, database, etc.

* html device routing pages

* add tests

* checks

* rework database id relationship

* scruntinizer inspection

* fix unit test for new mpls tables
2019-07-27 23:11:04 -05:00

52 lines
1.1 KiB
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use LibreNMS\Interfaces\Models\Keyable;
class MplsService extends Model implements Keyable
{
protected $primaryKey = 'svc_id';
public $timestamps = false;
protected $fillable = [
'svc_oid',
'device_id',
'svcRowStatus',
'svcType',
'svcCustId',
'svcAdminStatus',
'svcOperStatus',
'svcDescription',
'svcMtu',
'svcNumSaps',
'svcNumSdps',
'svcLastMgmtChange',
'svcLastStatusChange',
'svcVRouterId',
'svcTlsMacLearning',
'svcTlsStpAdminStatus',
'svcTlsStpOperStatus',
'svcTlsFdbTableSize',
'svcTlsFdbNumEntries',
];
// ---- Helper Functions ----
/**
* Get a string that can identify a unique instance of this model
* @return string
*/
public function getCompositeKey()
{
return $this->svc_oid;
}
// ---- Define Relationships ----
public function binds()
{
return $this->hasMany('App\Models\MplsSdpBind', 'svc_id');
}
}