/** * @return \yii\db\ActiveQuery */ public function getCompany() { return $this->hasOne(Companies::className(), ['id' => 'companies_id']); }