get('dbLog'); } /** * 获取id * @return string */ public function getId() { return (string) $this->_id; } /** * {@inheritdoc} */ public function attributes() { return [ '_id', 'admin_id', 'admin_name', 'ip', 'created_at', 'request_route', 'opt_type', 'save_before_content', 'save_after_content', 'key_log', 'opt_obj_id', 'opt_obj_name', 'remark', 'user_agent', 'period_num', 'is_batch', 'device', ]; } /** * {@inheritdoc} */ public function rules() { return [ [['admin_id', 'admin_name', 'ip', 'request_route', 'opt_type'], 'required'], [['created_at', 'key_log', 'period_num', 'is_batch'], 'integer'], [['admin_id', 'opt_obj_id'], 'string', 'max' => 32], [['admin_name', 'ip', 'opt_obj_name'], 'string', 'max' => 16], [['_id', 'opt_type', 'save_before_content', 'save_after_content', 'device'], 'safe'], [['user_agent', 'request_route', 'remark'], 'string', 'max' => 1000], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ '_id' => 'ID', 'admin_id' => '操作人id', 'admin_name' => '操作人', 'ip' => '操作ip', 'created_at' => '创建时间', 'request_route' => '请求路由', 'opt_type' => '操作类型', 'save_before_content' => '保存前的内容', 'save_after_content' => '保存后的内容', 'key_log' => '关键日志', 'opt_obj_id' => '操作对象id', 'opt_obj_name' => '操作对象名称', 'remark' => '备注', 'user_agent' => '浏览器特征', 'period_num' => '期数', 'is_batch' => '批量保存', 'device' => '客户端', ]; } }