/** * @return \yii\db\ActiveQuery */ public function getAdsType() { return $this->hasMany(Adstype::className(), ['id' => 'type_id']); }