public function afterDelete($event)
    {
        if (!$this->enableAuditField) {
            parent::afterDelete($event);
            return;
        }

        $date = time();
        $auditModels = $this->getAuditModels();
        $auditRequestId = $this->getAuditRequestId();
        $userId = Yii::app()->user && Yii::app()->user->id ? Yii::app()->user->id : 0;
        $auditFields = array();

        // prepare the logs
        $pk = $this->getModelPrimaryKeyString($this->auditModel);
        foreach ($auditModels as $auditModel) {
            $prefix = isset($auditModel['prefix']) ? $auditModel['prefix'] . '.' . $pk : '';
            $auditFields[] = array(
                'old_value' => '',
                'new_value' => '',
                'action' => 'DELETE',
                'model_name' => $auditModel['model_name'],
                'model_id' => $auditModel['model_id'],
                'field' => $prefix . '*',
                'created' => $date,
                'user_id' => $userId,
                'audit_request_id' => $auditRequestId,
            );
        }

        // insert the audit_field records
        $this->addAuditFields($auditFields);

        parent::afterDelete($event);
    }