ref #56
This commit is contained in:
@@ -44,7 +44,7 @@ export class ResponseStats {
|
||||
total_scans: number;
|
||||
|
||||
/**
|
||||
* The total distance that all runners ran.
|
||||
* The total distance that all runners ran combined.
|
||||
*/
|
||||
@IsInt()
|
||||
total_distance: number;
|
||||
@@ -56,11 +56,20 @@ export class ResponseStats {
|
||||
total_donation: number;
|
||||
|
||||
/**
|
||||
* The average distance per runner.
|
||||
* The average distance ran per runner.
|
||||
*/
|
||||
@IsInt()
|
||||
average_distance: number;
|
||||
|
||||
/**
|
||||
* Creates a new stats response containing some basic statistics for a dashboard or public display.
|
||||
* @param runners Array containing all runners - the following relations have to be resolved: scans, scans.track
|
||||
* @param teams Array containing all teams - no relations have to be resolved.
|
||||
* @param orgs Array containing all orgs - no relations have to be resolved.
|
||||
* @param users Array containing all users - no relations have to be resolved.
|
||||
* @param scans Array containing all scans - no relations have to be resolved.
|
||||
* @param donations Array containing all donations - the following relations have to be resolved: runner, runner.scans, runner.scans.track
|
||||
*/
|
||||
public constructor(runners: Runner[], teams: RunnerTeam[], orgs: RunnerOrganisation[], users: User[], scans: Scan[], donations: Donation[]) {
|
||||
this.total_runners = runners.length;
|
||||
this.total_teams = teams.length;
|
||||
|
||||
Reference in New Issue
Block a user