public function insert($entity, array $options = [], bool $fireEvents = true): bool
    {
        if ($fireEvents && false === $this->fireEvent('inserting', $entity, true)) {
            return false;
        }

        $data = $this->parseToDocument($entity);

        $queryResult = $this->getCollection()->insertOne(
            $data,
            $this->mergeOptions($options)
        );

        $result = $queryResult->isAcknowledged() && $queryResult->getInsertedCount();

        if ($result) {
            $this->afterSuccess($entity);

            if ($fireEvents) {
                $this->fireEvent('inserted', $entity);
            }
        }

        return $result;
    }