/** * @return \yii\db\ActiveQuery */ public function getLevel() { return $this->hasOne(Level::className(), ['id' => 'level_id']); }
public function getLevels() { return @$this->hasOne(Level::className(), ['level' => 'risk_level']); }