public function completeWithError($notice, $status = self::STATUS_ERROR) { $this->notice = $notice; $this->status = (int) $status; $this->complete_time = new CDbExpression('NOW()'); return $this->save(); }