mirror of
https://github.com/librenms/librenms.git
synced 2024-09-21 18:38:25 +00:00
0fc2f9e4c9
* add apis for mpsl services and saps * updated docs * removed dbFetch, orm instead * changed queries * Removed unused variables * Update api_functions.inc.php * Update api_functions.inc.php * Update api_functions.inc.php * Update api_functions.inc.php Co-authored-by: laf <gh+n@laf.io>
54 lines
1.2 KiB
PHP
54 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\HasMany;
|
|
use LibreNMS\Interfaces\Models\Keyable;
|
|
|
|
class MplsService extends DeviceRelatedModel 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 int
|
|
*/
|
|
public function getCompositeKey()
|
|
{
|
|
return $this->svc_oid;
|
|
}
|
|
|
|
// ---- Define Relationships ----
|
|
|
|
public function binds(): HasMany
|
|
{
|
|
return $this->hasMany(\App\Models\MplsSdpBind::class, 'svc_id');
|
|
}
|
|
}
|