Test Failed
Push — develop ( 55b248...7d9761 )
by Tony
21:25
created

Service   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 32
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
namespace App\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Illuminate\Database\Eloquent\Builder;
7
8
/**
9
 * App\Models\Service
10
 *
11
 * @property integer $service_id
12
 * @property integer $device_id
13
 * @property string $service_ip
14
 * @property string $service_type
15
 * @property string $service_desc
16
 * @property string $service_param
17
 * @property integer $service_ignore
18
 * @property integer $service_status
19
 * @property integer $service_changed
20
 * @property string $service_message
21
 * @property integer $service_disabled
22
 * @property string $service_ds
23
 * @property-read \App\Models\Device $device
24
 * @mixin \Eloquent
25
 */
26
class Service extends Model
27
{
28
    /**
29
     * Indicates if the model should be timestamped.
30
     *
31
     * @var bool
32
     */
33
    public $timestamps = false;
34
    /**
35
     * The table associated with the model.
36
     *
37
     * @var string
38
     */
39
    protected $table = 'services';
40
    /**
41
     * The primary key column name.
42
     *
43
     * @var string
44
     */
45
    protected $primaryKey = 'service_id';
46
47
    // ---- Define Reletionships ----
48
49
    /**
50
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
51
     */
52
    public function device()
53
    {
54
        return $this->belongsTo('App\Models\Device', 'device_id');
55
    }
56
57
}
58