Completed
Pull Request — develop (#199)
by
unknown
05:13
created

DeviceGraph::device()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace App\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
/**
8
 * App\Models\Device
9
 *
10
 * @property integer $device_id
11
 * @property string $graph
12
 **/
13
14
class DeviceGraph extends Model
15
{
16
    /**
17
     * Indicates if the model should be timestamped.
18
     *
19
     * @var bool
20
     */
21
    public $timestamps = false;
22
23
    /**
24
     * The table associated with the model.
25
     *
26
     * @var string
27
     */
28
    protected $table = 'device_graphs';
29
30
    /**
31
     * The attributes that are mass assignable.
32
     *
33
     * @var array
34
     */
35
    protected $fillable = ['device_id','graph'];
36
37
38
    public function device()
39
    {
40
        return $this->belongsTo('App\Models\Device', 'device_id');
41
    }
42
}
43