Completed
Pull Request — develop (#107)
by Neil
20:59
created

Syslog::device()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace App\Models\General;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\Builder;
7
8
/**
9
 * App\Models\General\Syslog
10
 *
11
 * @property integer $device_id
12
 * @property string $hostname
13
 * @property string $sysName
14
 * @property mixed $ip
15
 * @property string $community
16
 * @property string $authlevel
17
 * @property string $authname
18
 * @property string $authpass
19
 * @property string $authalgo
20
 * @property string $cryptopass
21
 * @property string $cryptoalgo
22
 * @property string $snmpver
23
 * @property integer $port
24
 * @property string $transport
25
 * @property integer $timeout
26
 * @property integer $retries
27
 * @property string $bgpLocalAs
28
 * @property string $sysObjectID
29
 * @property string $sysDescr
30
 * @property string $sysContact
31
 * @property string $version
32
 * @property string $hardware
33
 * @property string $features
34
 * @property string $location
35
 * @property string $os
36
 * @property boolean $status
37
 * @property string $status_reason
38
 * @property boolean $ignore
39
 * @property boolean $disabled
40
 * @property integer $uptime
41
 * @property integer $agent_uptime
42
 * @property string $last_polled
43
 * @property string $last_poll_attempted
44
 * @property float $last_polled_timetaken
45
 * @property float $last_discovered_timetaken
46
 * @property string $last_discovered
47
 * @property string $last_ping
48
 * @property float $last_ping_timetaken
49
 * @property string $purpose
50
 * @property string $type
51
 * @property string $serial
52
 * @property string $icon
53
 * @property integer $poller_group
54
 * @property boolean $override_sysLocation
55
 * @property string $notes
56
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereDeviceId($value)
57
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereHostname($value)
58
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereSysName($value)
59
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereIp($value)
60
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereCommunity($value)
61
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereAuthlevel($value)
62
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereAuthname($value)
63
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereAuthpass($value)
64
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereAuthalgo($value)
65
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereCryptopass($value)
66
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereCryptoalgo($value)
67
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereSnmpver($value)
68
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog wherePort($value)
69
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereTransport($value)
70
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereTimeout($value)
71
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereRetries($value)
72
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereBgpLocalAs($value)
73
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereSysObjectID($value)
74
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereSysDescr($value)
75
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereSysContact($value)
76
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereVersion($value)
77
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereHardware($value)
78
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereFeatures($value)
79
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereLocation($value)
80
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereOs($value)
81
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereStatus($value)
82
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereStatusReason($value)
83
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereIgnore($value)
84
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereDisabled($value)
85
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereUptime($value)
86
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereAgentUptime($value)
87
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereLastPolled($value)
88
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereLastPollAttempted($value)
89
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereLastPolledTimetaken($value)
90
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereLastDiscoveredTimetaken($value)
91
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereLastDiscovered($value)
92
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereLastPing($value)
93
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereLastPingTimetaken($value)
94
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog wherePurpose($value)
95
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereType($value)
96
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereSerial($value)
97
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereIcon($value)
98
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog wherePollerGroup($value)
99
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereOverrideSysLocation($value)
100
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Syslog whereNotes($value)
101
 * @mixin \Eloquent
102
 */
103
class Syslog extends Model
104
{
105
    /**
106
     * Indicates if the model should be timestamped.
107
     *
108
     * @var bool
109
     */
110
    public $timestamps = false;
111
    /**
112
     * The table associated with the model.
113
     *
114
     * @var string
115
     */
116
    protected $table = 'syslog';
117
    /**
118
     * The primary key column name.
119
     *
120
     * @var string
121
     */
122
    protected $primaryKey = 'seq';
123
124
125
    // ---- Accessors/Mutators ----
126
127
128
    // ---- Define Reletionships ----
129
130
    /**
131
     * Returns the device this entry belongs to.
132
     */
133
    public function device()
134
    {
135
        return $this->belongsTo('App\Models\Device', 'device_id', 'device_id');
136
    }
137
}
138