/** * @return \yii\db\ActiveQuery */ public function getPerson() { return $this->hasOne(Person::className(), ['third_id' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getPeople() { return $this->hasMany(Person::className(), ['gender_id' => 'id']); }