123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- namespace app\user\model;
- class SystemLog extends Base{
- protected $schema = [
- 'id' => 'bigint',
- 'system' => 'string',
- 'controller' => 'string',
- 'action' => 'string',
- 'param' => 'text',
- 'response' => 'text',
- 'action_name' => 'string',
- 'action_id' => 'int',
- 'client_ip'=>'string',
- 'createTime' => 'datetime',
- ];
- protected $type = [
- 'id' => 'integer',
- 'createTime' => 'datetime',
- ];
- protected $createTime = 'createTime';
- protected $append=['action_msg'];
- public function getActionMsgAttr($value,$data){
- return \SystemLog::GET_LOG_PATH($data,$data['action_name'],$data['param']);
- }
- public function getParamAttr($value){
- return json_decode($value,true);
- }
- public function getResponseAttr($value){
- return json_decode($value,true);
- }
- }
|