/** * @return \yii\db\ActiveQuery */ public function getCodUnidad() { return $this->hasOne(Unidad::className(), ['codigo' => 'cod_unidad']); }