/** * @return \yii\db\ActiveQuery */ public function getDepartment() { return $this->hasOne(User::className(), ['id' => 'departmentId']); }
/** * @return \yii\db\ActiveQuery */ public function getUsers() { return $this->hasMany(User::className(), ['profileId' => 'id']); }
/** * @return \yii\db\ActiveQuery */ public function getUsers() { return $this->hasMany(User::className(), ['departmentId' => 'id']); }