include data points

This commit is contained in:
Michael Simard
2020-06-16 16:51:19 -05:00
parent 40e23960f1
commit 72a04f8823
2 changed files with 41 additions and 21 deletions

View File

@@ -11,16 +11,30 @@ import Foundation
import Fluent
import Vapor
struct DataPoint : Content {
var x:String
var y:Double
init(x:String, y:Double) {
self.x = x
self.y = y
}
}
final class AllStats: Content {
var overall:Stats
var byMonth: [MonthStats]
var highestWinLossRatio:String
var highestWinLossRatio:String
var dataPoints:[DataPoint]
init( overall:Stats, byMonth:[MonthStats], highestWinLossRatio:String) {
init( overall:Stats, byMonth:[MonthStats], highestWinLossRatio:String, dataPoints:[DataPoint]) {
self.overall = overall
self.byMonth = byMonth
self.highestWinLossRatio = highestWinLossRatio
}
self.dataPoints = dataPoints
}
}