2020-04-29 07:25:13 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
2021-06-11 20:48:33 +02:00
|
|
|
use LibreNMS\Interfaces\Models\Keyable;
|
|
|
|
|
|
|
|
|
|
class Sla extends DeviceRelatedModel implements Keyable
|
2020-04-29 07:25:13 -05:00
|
|
|
{
|
2021-06-11 20:48:33 +02:00
|
|
|
protected $table = 'slas';
|
2020-04-29 07:25:13 -05:00
|
|
|
protected $primaryKey = 'sla_id';
|
|
|
|
|
public $timestamps = false;
|
2021-06-11 20:48:33 +02:00
|
|
|
protected $fillable = [
|
|
|
|
|
'device_id',
|
|
|
|
|
'sla_nr',
|
|
|
|
|
'owner',
|
|
|
|
|
'tag',
|
|
|
|
|
'rtt_type',
|
|
|
|
|
'rtt',
|
|
|
|
|
'status',
|
|
|
|
|
'opstatus',
|
|
|
|
|
'deleted',
|
|
|
|
|
];
|
|
|
|
|
protected $attributes = [ // default values
|
|
|
|
|
'deleted' => 0,
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
public function getCompositeKey()
|
|
|
|
|
{
|
|
|
|
|
return "$this->owner-$this->tag";
|
|
|
|
|
}
|
2020-04-29 07:25:13 -05:00
|
|
|
}
|