ServerInformationLog.php
930 字节
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
<?php
namespace App\Models\Devops;
use Illuminate\Database\Eloquent\Model;
class ServerInformationLog extends Model
{
protected $table = 'gl_server_information_log';
const CREATED_AT = 'create_at';
const UPDATED_AT = 'update_at';
public function getOriginalAttribute($value)
{
return json_decode($value, true);
}
public function getRevisedAttribute($value)
{
return json_decode($value, true);
}
/** @var int 日志添加 */
const ACTION_ADD = 1;
/** @var int 日志修改 */
const ACTION_UPDATE = 2;
/** @var int 日志删除 */
const ACTION_DELETE = 3;
/** @var int 日志恢复 */
const ACTION_RECOVER = 4;
/**
* @return string[]
*/
public static function actionArr()
{
return [
1 => '添加',
2 => '修改',
3 => '删除',
4 => '恢复',
];
}
}