// Path: sonar-connector/src/main/java/com/thepracticaldeveloper/devgame/modules/stats/domain/SonarStatsRow.java
// public final class SonarStatsRow {
// 
//     private String userAlias;
//     private String userTeam;
//     private int totalPoints;
//     private int totalPaidDebt;
//     private int blocker;
//     private int critical;
//     private int major;
//     private int minor;
//     private int info;
//     private Collection<SonarBadge> badges;
// 
//     public SonarStatsRow(String userAlias, String userTeam, int totalPoints, int totalPaidDebt, int blocker, int critical, int major, int minor, int info, Collection<SonarBadge> badges) {
//         super();
//         this.userAlias = userAlias;
//         this.userTeam = userTeam;
//         this.totalPoints = totalPoints;
//         this.totalPaidDebt = totalPaidDebt;
//         this.blocker = blocker;
//         this.critical = critical;
//         this.major = major;
//         this.minor = minor;
//         this.info = info;
//         this.badges = badges;
//     }
// 
//     public SonarStatsRow(final String userAlias, final String userTeam) {
//         this(userAlias, userTeam, 0, 0, 0, 0, 0, 0, 0, new ArrayList<>());
//     }
// 
//     public void addTotalPoints(int points) {
//         this.totalPoints += points;
//     }
// 
//     public void addPaidDebt(int debt) {
//         this.totalPaidDebt += debt;
//     }
// 
//     public void addBlocker(int blocker) {
//         this.blocker += blocker;
//     }
// 
//     public void addCritical(int critical) {
//         this.critical = critical;
//     }
// 
//     public void addMajor(int major) {
//         this.major = major;
//     }
// 
//     public void addMinor(int minor) {
//         this.minor = minor;
//     }
// 
//     public void addInfo(int info) {
//         this.info = info;
//     }
// 
//     public void addBadge(SonarBadge badge) {
//         this.badges.add(badge);
//     }
// 
//     public String getUserAlias() {
//         return userAlias;
//     }
// 
//     public String getUserTeam() {
//         return userTeam;
//     }
// 
//     public int getTotalPoints() {
//         return totalPoints;
//     }
// 
//     public int getTotalPaidDebt() {
//         return totalPaidDebt;
//     }
// 
//     public int getBlocker() {
//         return blocker;
//     }
// 
//     public int getCritical() {
//         return critical;
//     }
// 
//     public int getMajor() {
//         return major;
//     }
// 
//     public int getMinor() {
//         return minor;
//     }
// 
//     public int getInfo() {
//         return info;
//     }
// 
//     public Collection<SonarBadge> getBadges() {
//         return badges;
//     }
// 
// }
// 
// Path: sonar-connector/src/main/java/com/thepracticaldeveloper/devgame/modules/stats/service/SonarStatsService.java
// public interface SonarStatsService {
//     Collection<SonarStatsRow> getSortedStatsPerUser();
// 
//     Collection<SonarStatsRow> getSortedStatsPerTeam();
// 
//     MessageResponseDTO deleteAllStats();
// }
// 
// Path: sonar-connector/src/main/java/com/thepracticaldeveloper/devgame/modules/users/dto/MessageResponseDTO.java
// public final class MessageResponseDTO {
//     @JsonProperty("message")
//     private final String message;
// 
//     @JsonProperty("error")
//     private final boolean error;
// 
//     public MessageResponseDTO(final String message, final boolean error) {
//         this.message = message;
//         this.error = error;
//     }
// 
//     public MessageResponseDTO(final String message) {
//         this(message, false);
//     }
// 
//     @Override
//     public String toString() {
//         return "MessageResponseDTO{" +
//                 "message='" + message + '\'' +
//                 ", error=" + error +
//                 '}';
//     }
// }


import com.thepracticaldeveloper.devgame.modules.stats.domain.SonarStatsRow;
import com.thepracticaldeveloper.devgame.modules.stats.service.SonarStatsService;
import com.thepracticaldeveloper.devgame.modules.users.dto.MessageResponseDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.Collection;
package com.thepracticaldeveloper.devgame.modules.stats.controller;



@RestController
@RequestMapping(value = {"/stats"})
public class SonarStatsController {
    private SonarStatsService sonarStatsService;

    @Autowired
    public SonarStatsController(final SonarStatsService sonarStatsService) {
        this.sonarStatsService = sonarStatsService;
    }

    @RequestMapping(value = {"/users", ""}, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
// Path: sonar-connector/src/main/java/com/thepracticaldeveloper/devgame/modules/stats/domain/SonarStatsRow.java
// public final class SonarStatsRow {
// 
//     private String userAlias;
//     private String userTeam;
//     private int totalPoints;
//     private int totalPaidDebt;
//     private int blocker;
//     private int critical;
//     private int major;
//     private int minor;
//     private int info;
//     private Collection<SonarBadge> badges;
// 
//     public SonarStatsRow(String userAlias, String userTeam, int totalPoints, int totalPaidDebt, int blocker, int critical, int major, int minor, int info, Collection<SonarBadge> badges) {
//         super();
//         this.userAlias = userAlias;
//         this.userTeam = userTeam;
//         this.totalPoints = totalPoints;
//         this.totalPaidDebt = totalPaidDebt;
//         this.blocker = blocker;
//         this.critical = critical;
//         this.major = major;
//         this.minor = minor;
//         this.info = info;
//         this.badges = badges;
//     }
// 
//     public SonarStatsRow(final String userAlias, final String userTeam) {
//         this(userAlias, userTeam, 0, 0, 0, 0, 0, 0, 0, new ArrayList<>());
//     }
// 
//     public void addTotalPoints(int points) {
//         this.totalPoints += points;
//     }
// 
//     public void addPaidDebt(int debt) {
//         this.totalPaidDebt += debt;
//     }
// 
//     public void addBlocker(int blocker) {
//         this.blocker += blocker;
//     }
// 
//     public void addCritical(int critical) {
//         this.critical = critical;
//     }
// 
//     public void addMajor(int major) {
//         this.major = major;
//     }
// 
//     public void addMinor(int minor) {
//         this.minor = minor;
//     }
// 
//     public void addInfo(int info) {
//         this.info = info;
//     }
// 
//     public void addBadge(SonarBadge badge) {
//         this.badges.add(badge);
//     }
// 
//     public String getUserAlias() {
//         return userAlias;
//     }
// 
//     public String getUserTeam() {
//         return userTeam;
//     }
// 
//     public int getTotalPoints() {
//         return totalPoints;
//     }
// 
//     public int getTotalPaidDebt() {
//         return totalPaidDebt;
//     }
// 
//     public int getBlocker() {
//         return blocker;
//     }
// 
//     public int getCritical() {
//         return critical;
//     }
// 
//     public int getMajor() {
//         return major;
//     }
// 
//     public int getMinor() {
//         return minor;
//     }
// 
//     public int getInfo() {
//         return info;
//     }
// 
//     public Collection<SonarBadge> getBadges() {
//         return badges;
//     }
// 
// }
// 
// Path: sonar-connector/src/main/java/com/thepracticaldeveloper/devgame/modules/stats/service/SonarStatsService.java
// public interface SonarStatsService {
//     Collection<SonarStatsRow> getSortedStatsPerUser();
// 
//     Collection<SonarStatsRow> getSortedStatsPerTeam();
// 
//     MessageResponseDTO deleteAllStats();
// }
// 
// Path: sonar-connector/src/main/java/com/thepracticaldeveloper/devgame/modules/users/dto/MessageResponseDTO.java
// public final class MessageResponseDTO {
//     @JsonProperty("message")
//     private final String message;
// 
//     @JsonProperty("error")
//     private final boolean error;
// 
//     public MessageResponseDTO(final String message, final boolean error) {
//         this.message = message;
//         this.error = error;
//     }
// 
//     public MessageResponseDTO(final String message) {
//         this(message, false);
//     }
// 
//     @Override
//     public String toString() {
//         return "MessageResponseDTO{" +
//                 "message='" + message + '\'' +
//                 ", error=" + error +
//                 '}';
//     }
// }


// Path: sonar-connector/src/main/java/com/thepracticaldeveloper/devgame/modules/stats/controller/SonarStatsController.java
import com.thepracticaldeveloper.devgame.modules.stats.domain.SonarStatsRow;
import com.thepracticaldeveloper.devgame.modules.stats.service.SonarStatsService;
import com.thepracticaldeveloper.devgame.modules.users.dto.MessageResponseDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.Collection;

package com.thepracticaldeveloper.devgame.modules.stats.controller;



@RestController
@RequestMapping(value = {"/stats"})
public class SonarStatsController {
    private SonarStatsService sonarStatsService;

    @Autowired
    public SonarStatsController(final SonarStatsService sonarStatsService) {
        this.sonarStatsService = sonarStatsService;
    }

    @RequestMapping(value = {"/users", ""}, method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)
    public Collection<SonarStatsRow> statsHome() {