/** * @return \yii\db\ActiveQuery */ public function getSociety() { return $this->hasOne(Company::className(), ['third_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getCompanies() { return $this->hasMany(Company::className(), ['company_type' => 'id']); }