public function getComplainant() { return $this->hasOne(Complainant::className(), ['id' => 'complainant_id']); }
/** * @return \yii\db\ActiveQuery */ public function getComplainants() { return $this->hasMany(Complainant::className(), ['sector_id' => 'id']); }