forked from ProcessMaker/processmaker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSecurityLog.php
More file actions
74 lines (66 loc) · 1.76 KB
/
SecurityLog.php
File metadata and controls
74 lines (66 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
namespace ProcessMaker\Models;
use ProcessMaker\Traits\ExtendedPMQL;
/**
* Class SecurityLog
*
*
* @property Carbon $updated_at
* @property Carbon $created_at
*
* @OA\Schema(
* schema="securityLog",
* @OA\Property(property="id", type="integer"),
* @OA\Property(property="event", type="string"),
* @OA\Property(property="ip", type="string"),
* @OA\Property(property="meta", type="array",
* @OA\Items(type="object",
* @OA\Property(property="os", type="array",
* @OA\Items(type="object",
* @OA\Property(property="name", type="string"),
* @OA\Property(property="version", type="string"),
* ),
* ),
* @OA\Property(property="browser", type="array",
* @OA\Items(type="object",
* @OA\Property(property="name", type="string"),
* @OA\Property(property="version", type="string"),
* ),
* ),
* @OA\Property(property="user_agent", type="string"),
* ),
* ),
* @OA\Property(property="user_id", type="integer"),
* @OA\Property(property="occured_at", type="string"),
* ),
*/
class SecurityLog extends ProcessMakerModel
{
use ExtendedPMQL;
const CREATED_AT = 'occurred_at';
const UPDATED_AT = null;
/**
* The attributes that aren't mass assignable.
*
* @var array
*/
protected $guarded = [
'id',
'occurred_at',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'meta' => 'object',
];
/**
* Get the associated user, if any.
*/
public function user()
{
return $this->belongsTo('ProcessMaker\Models\User');
}
}