public function getArole() { return $this->hasOne(UserRole::className(), ['role_id' => 'role']); }
public function getUserRole() { return $this->hasOne(UserRole::className(), ['user_id' => 'user_id']); }
/** * @return \yii\db\ActiveQuery */ public function getUserRoles() { return $this->hasMany(UserRole::className(), ['user_id' => 'id']); }