Inventory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 36
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A device() 0 4 1
1
<?php
2
/**
3
 * app/Models/General/Inventory.php
4
 *
5
 * Model for inventory
6
 *
7
 * This program is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU General Public License as published by
9
 * the Free Software Foundation, either version 3 of the License, or
10
 * (at your option) any later version.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
15
 * GNU General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU General Public License
18
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
 *
20
 * @package    LibreNMS
21
 * @link       http://librenms.org
22
 * @copyright  2016 Neil Lathwood
23
 * @author     Neil Lathwood <[email protected]>
24
 */
25
26
namespace App\Models\General;
27
28
use Illuminate\Database\Eloquent\Model;
29
30
/**
31
 * App\Models\General\Inventory
32
 *
33
 * @property integer $entPhysical_id
34
 * @property integer $device_id
35
 * @property integer $entPhysicalIndex
36
 * @property string $entPhysicalDescr
37
 * @property string $entPhysicalClass
38
 * @property string $entPhysicalName
39
 * @property string $entPhysicalHardwareRev
40
 * @property string $entPhysicalFirmwareRev
41
 * @property string $entPhysicalSoftwareRev
42
 * @property string $entPhysicalAlias
43
 * @property string $entPhysicalAssetID
44
 * @property string $entPhysicalIsFRU
45
 * @property string $entPhysicalModelName
46
 * @property string $entPhysicalVendorType
47
 * @property string $entPhysicalSerialNum
48
 * @property integer $entPhysicalContainedIn
49
 * @property integer $entPhysicalParentRelPos
50
 * @property string $entPhysicalMfgName
51
 * @property integer $ifIndex
52
 * @property-read \App\Models\Device $device
53
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalId($value)
54
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereDeviceId($value)
55
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalIndex($value)
56
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalDescr($value)
57
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalClass($value)
58
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalName($value)
59
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalHardwareRev($value)
60
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalFirmwareRev($value)
61
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalSoftwareRev($value)
62
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalAlias($value)
63
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalAssetID($value)
64
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalIsFRU($value)
65
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalModelName($value)
66
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalVendorType($value)
67
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalSerialNum($value)
68
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalContainedIn($value)
69
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalParentRelPos($value)
70
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereEntPhysicalMfgName($value)
71
 * @method static \Illuminate\Database\Query\Builder|\App\Models\General\Inventory whereIfIndex($value)
72
 * @mixin \Eloquent
73
 */
74
class Inventory extends Model
75
{
76
    /**
77
     * Indicates if the model should be timestamped.
78
     *
79
     * @var bool
80
     */
81
    public $timestamps = false;
82
    /**
83
     * The table associated with the model.
84
     *
85
     * @var string
86
     */
87
    protected $table = 'entPhysical';
88
    /**
89
     * The primary key column name.
90
     *
91
     * @var string
92
     */
93
    protected $primaryKey = 'entPhysical_id';
94
95
96
    // ---- Accessors/Mutators ----
97
98
99
    // ---- Define Relationships ----
100
101
    /**
102
     * Returns the device this entry belongs to.
103
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
104
     */
105
    public function device()
106
    {
107
        return $this->belongsTo('App\Models\Device', 'device_id');
108
    }
109
}
110