/** * @return \yii\db\ActiveQuery */ public function getUser() { return $this->hasOne(User::className(), ['Id' => 'userId']); }
/** * @return \yii\db\ActiveQuery */ public function getUsers() { return $this->hasMany(User::className(), ['reportTo' => 'Id']); }