get('dbLog'); } /** * 获取id * @return string */ public function getId() { return (string) $this->_id; } /** * {@inheritdoc} */ public function attributes() { return [ '_id', 'user_name', 'ip', 'created_at', 'user_agent', 'period_num', 'opt_type', 'success_times', 'fail_times', 'device', 'request_route', 'return_result', ]; } /** * {@inheritdoc} */ public function rules() { return [ [['user_name', 'ip', 'request_route'], 'required'], [['created_at', 'success_times', 'period_num', 'fail_times'], 'integer'], [['user_name', 'ip', 'opt_type'], 'string', 'max' => 16], [['_id', 'return_result', 'device',], 'safe'], [['user_agent', 'request_route'], 'string', 'max' => 1000], ]; } /** * {@inheritdoc} */ public function attributeLabels() { return [ '_id' => 'ID', 'user_name' => '对象编号', 'ip' => '操作ip', 'created_at' => '创建时间', 'user_agent' => '浏览器特征', 'period_num' => '期数', 'opt_type' => '操作类型', 'success_times' => '登陆成功次数', 'fail_times' => '登录失败次数', 'device' => '客户端', 'request_route' => '请求路径', 'return_result' => '返回内容', ]; } }