public function leaves() {
        $condition = [
            'and',
            [$this->leftAttribute => ['$gt' => $this->owner->getAttribute($this->leftAttribute)]],
            [$this->rightAttribute => ['$lt' => $this->owner->getAttribute($this->rightAttribute)]],
            ['$where' => "this.{$this->rightAttribute} = this.{$this->leftAttribute} + 1"]
        ];

        $this->applyTreeAttributeCondition($condition);

        return $this->owner->find()->andWhere($condition)->addOrderBy([$this->leftAttribute => SORT_ASC]);
    }