/** * @return \yii\db\ActiveQuery */ public function getDefaultAppellation() { return $this->hasOne(Appellations::className(), ['id' => 'default_appellation_id']); }
/** * @return \yii\db\ActiveQuery */ public function getAppellations() { return $this->hasMany(Appellations::className(), ['region_id' => 'id']); }