public function getSortStructure()
    {
        $sort = [$this->getField() => (object)['order' => $this->getOrder()]];

        if ($this->getMode()) {
            $sort[$this->getField()]->mode = $this->getMode();
        }
        if ($this->getMissing()) {
            $sort[$this->getField()]->missing = $this->getMissing();
        }

        return (object)$sort;
    }