/** * @return \yii\db\ActiveQuery */ public function getEmployees() { return $this->hasMany(Employee::className(), ['position_id' => 'position_id']); }
/** * @return \yii\db\ActiveQuery */ public function getEmployee() { return $this->hasOne(Employee::className(), ['employee_id' => 'employee_id']); }
public function getEmployees() { return $this->hasMany(Employee::className(), ['department_id' => 'id']); }