added MobilityScore
This commit is contained in:
@@ -34,6 +34,8 @@ public class Stats {
|
||||
@Schema(description = "Total kilometers driven by the user in timeframe.", example = "300", required = true)
|
||||
private Long KM_DRIVEN;
|
||||
|
||||
@Schema(description = "Total Mobility score", example = "45", required = true)
|
||||
private Long MOBILITY_SCORE;
|
||||
|
||||
// Constructors
|
||||
|
||||
@@ -41,6 +43,8 @@ public class Stats {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public Stats(StatsList statsList) {
|
||||
this.statsList = statsList;
|
||||
this.XP = 0L;
|
||||
@@ -49,6 +53,7 @@ public class Stats {
|
||||
this.KM_WALKED = 0L;
|
||||
this.KM_PUBLIC_TRANSPORT = 0L;
|
||||
this.KM_DRIVEN = 0L;
|
||||
this.MOBILITY_SCORE = 0L;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,4 +115,12 @@ public class Stats {
|
||||
public void setKM_DRIVEN(Long KM_DRIVEN) {
|
||||
this.KM_DRIVEN = KM_DRIVEN;
|
||||
}
|
||||
|
||||
public Long getMobility_SCORE() {
|
||||
return MOBILITY_SCORE;
|
||||
}
|
||||
|
||||
public void setMobility_SCORE(Long mobility_SCORE) {
|
||||
MOBILITY_SCORE = mobility_SCORE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,8 @@ public class StatsService {
|
||||
"KM_CYCLED",
|
||||
"KM_WALKED",
|
||||
"KM_PUBLIC_TRANSPORT",
|
||||
"KM_DRIVEN"
|
||||
"KM_DRIVEN",
|
||||
"MOBILITY_SCORE"
|
||||
);
|
||||
|
||||
@Transactional
|
||||
|
||||
Reference in New Issue
Block a user