1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- namespace app\user\model;
- class SystemLog extends Base{
- // CREATE TABLE `sys_system_log` (
- // `id` bigint(20) NOT NULL AUTO_INCREMENT,
- // `system` varchar(255) NOT NULL,
- // `controller` varchar(255) NOT NULL,
- // `action` varchar(255) NOT NULL,
- // `param` text NOT NULL,
- // `response` text NOT NULL,
- // `action_name` varchar(255) NOT NULL,
- // `action_id` int(11) NOT NULL,
- // `createTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
- // PRIMARY KEY (`id`)
- // ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4
- 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 $json = ['param','response'];
- 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']);
- }
- }
|