|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace App\Models\General; |
|
4
|
|
|
|
|
5
|
|
|
use Illuminate\Database\Eloquent\Model; |
|
6
|
|
|
|
|
7
|
|
|
/** |
|
8
|
|
|
* App\Models\General\Eventlog |
|
9
|
|
|
* |
|
10
|
|
|
* @property integer $event_id |
|
11
|
|
|
* @property integer $host |
|
12
|
|
|
* @property string $datetime |
|
13
|
|
|
* @property integer $device_id |
|
14
|
|
|
* @property string $message |
|
15
|
|
|
* @property string $type |
|
16
|
|
|
* @property string $reference |
|
17
|
|
|
* @property-read \App\Models\Device $device |
|
18
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\General\Eventlog whereEventId($value) |
|
19
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\General\Eventlog whereHost($value) |
|
20
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\General\Eventlog whereDatetime($value) |
|
21
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\General\Eventlog whereDeviceId($value) |
|
22
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\General\Eventlog whereMessage($value) |
|
23
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\General\Eventlog whereType($value) |
|
24
|
|
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\General\Eventlog whereReference($value) |
|
25
|
|
|
* @mixin \Eloquent |
|
26
|
|
|
*/ |
|
27
|
|
|
class Eventlog extends Model |
|
28
|
|
|
{ |
|
29
|
|
|
/** |
|
30
|
|
|
* Indicates if the model should be timestamped. |
|
31
|
|
|
* |
|
32
|
|
|
* @var bool |
|
33
|
|
|
*/ |
|
34
|
|
|
public $timestamps = false; |
|
35
|
|
|
/** |
|
36
|
|
|
* The table associated with the model. |
|
37
|
|
|
* |
|
38
|
|
|
* @var string |
|
39
|
|
|
*/ |
|
40
|
|
|
protected $table = 'eventlog'; |
|
41
|
|
|
/** |
|
42
|
|
|
* The primary key column name. |
|
43
|
|
|
* |
|
44
|
|
|
* @var string |
|
45
|
|
|
*/ |
|
46
|
|
|
protected $primaryKey = 'event_id'; |
|
47
|
|
|
|
|
48
|
|
|
|
|
49
|
|
|
// ---- Accessors/Mutators ---- |
|
50
|
|
|
|
|
51
|
|
|
|
|
52
|
|
|
// ---- Define Relationships ---- |
|
53
|
|
|
|
|
54
|
|
|
/** |
|
55
|
|
|
* Returns the device this entry belongs to. |
|
56
|
|
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
57
|
|
|
*/ |
|
58
|
|
|
public function device() |
|
59
|
|
|
{ |
|
60
|
|
|
return $this->belongsTo('App\Models\Device', 'host'); |
|
61
|
|
|
} |
|
62
|
|
|
} |
|
63
|
|
|
|