public function prev()
{
$owner = $this->getOwner();
$query = $owner::query()->where($this->rightAttribute . '=' . ($owner->{$this->leftAttribute} - 1));
if ($this->hasManyRoots) {
$query = $query->andWhere($this->rootAttribute . '=' . $owner->{$this->rootAttribute});
}
return $query->execute()->getFirst();
}