2019-11-17 16:30:43 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
2021-03-31 17:28:47 +02:00
|
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
|
2019-11-17 16:30:43 +01:00
|
|
|
class Route extends DeviceRelatedModel
|
|
|
|
{
|
|
|
|
protected $table = 'route';
|
|
|
|
protected $primaryKey = 'route_id';
|
|
|
|
public static $translateProto = [
|
|
|
|
'undefined',
|
|
|
|
'other',
|
|
|
|
'local',
|
|
|
|
'netmgmt',
|
|
|
|
'icmp',
|
|
|
|
'egp',
|
|
|
|
'ggp',
|
|
|
|
'hello',
|
|
|
|
'rip',
|
|
|
|
'isIs',
|
|
|
|
'esIs',
|
|
|
|
'ciscoIgrp',
|
|
|
|
'bbnSpfIgp',
|
|
|
|
'ospf',
|
|
|
|
'bgp',
|
|
|
|
'idpr',
|
|
|
|
'ciscoEigrp',
|
2020-09-21 14:54:51 +02:00
|
|
|
'dvmrp',
|
2019-11-17 16:30:43 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
public static $translateType = [
|
|
|
|
'undefined',
|
|
|
|
'other',
|
|
|
|
'reject',
|
|
|
|
'local',
|
|
|
|
'remote',
|
|
|
|
'blackhole',
|
|
|
|
];
|
|
|
|
|
|
|
|
public $timestamps = true;
|
|
|
|
|
|
|
|
// ---- Define Relationships ----
|
2021-03-31 17:28:47 +02:00
|
|
|
public function port(): BelongsTo
|
2019-11-17 16:30:43 +01:00
|
|
|
{
|
2020-04-21 14:28:48 +02:00
|
|
|
return $this->belongsTo(\App\Models\Port::class, 'port_id', 'port_id');
|
2019-11-17 16:30:43 +01:00
|
|
|
}
|
|
|
|
}
|