protected function extractBasicFields(EventInterface $event, $serialize = true)
    {
        $fields = [
            'transaction' => $event->getTransactionId(),
            'type' => $event->getEventType(),
            'source' => $event->getSourceName(),
            'parent_source' => null,
            'original' => null,
            'changed' => null,
            'created' => new \DateTime($event->getTimestamp())
        ];

        if (method_exists($event, 'getParentSourceName')) {
            $fields['parent_source'] = $event->getParentSourceName();
        }

        if ($event instanceof BaseEvent) {
            $fields['original'] = $serialize ? $this->serialize($event->getOriginal()) : $event->getOriginal();
            $fields['changed'] = $serialize ? $this->serialize($event->getChanged()) : $event->getChanged();
        }

        return $fields;
    }