public function getTopic() { return $this->hasOne(Topic::className(), ['id' => 'post_id'])->where(['type' => 'topic']); }