/** * @return \yii\db\ActiveQuery */ public function getSession() { return $this->hasOne(OauthSessions::className(), ['id' => 'session_id']); }
/** * @return \yii\db\ActiveQuery */ public function getOauthSessions() { return $this->hasMany(OauthSessions::className(), ['client_id' => 'id']); }