Completed
Push — psr2 ( d57791 )
by Tony
09:39
created

Service   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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