speed update, new table for cached stats
This commit is contained in:
@@ -41,26 +41,35 @@ final class AllStats: Content {
|
||||
}
|
||||
}
|
||||
|
||||
final class OverallStats: Content {
|
||||
var overall:StatsWithMostRecentDailyRecord
|
||||
var mwStats:StatsWithMostRecentDailyRecord
|
||||
var bocwStats:StatsWithMostRecentDailyRecord
|
||||
var mostRecentRecord:String
|
||||
final class DashboardStats: Content {
|
||||
var dashboardItems:[DashboardItem] = []
|
||||
|
||||
|
||||
init(dashboardItems:[DashboardItem] ){
|
||||
self.dashboardItems = dashboardItems
|
||||
}
|
||||
}
|
||||
|
||||
var statsWithHyder:Stats
|
||||
var statsWithoutHyder:Stats
|
||||
final class OverallStats: Content {
|
||||
// var overall:StatsWithMostRecentDailyRecord
|
||||
// var mwStats:StatsWithMostRecentDailyRecord
|
||||
// var bocwStats:StatsWithMostRecentDailyRecord
|
||||
// var mostRecentRecord:String
|
||||
|
||||
// var statsWithHyder:Stats
|
||||
// var statsWithoutHyder:Stats
|
||||
|
||||
var dashboardItems:[DashboardItem] = []
|
||||
|
||||
init( overall:StatsWithMostRecentDailyRecord, mwStats:StatsWithMostRecentDailyRecord, bocwStats:StatsWithMostRecentDailyRecord, mostRecentRecord:String, statsWithHyder:Stats, statsWithoutHyder:Stats, dashboardItems:[DashboardItem]){
|
||||
init(dashboardItems:[DashboardItem]){
|
||||
|
||||
self.overall = overall
|
||||
self.mwStats = mwStats;
|
||||
self.bocwStats = bocwStats;
|
||||
self.mostRecentRecord = mostRecentRecord
|
||||
// self.overall = overall
|
||||
// self.mwStats = mwStats;
|
||||
// self.bocwStats = bocwStats;
|
||||
// self.mostRecentRecord = mostRecentRecord
|
||||
|
||||
self.statsWithHyder = statsWithHyder
|
||||
self.statsWithoutHyder = statsWithoutHyder
|
||||
// self.statsWithHyder = statsWithHyder
|
||||
// self.statsWithoutHyder = statsWithoutHyder
|
||||
|
||||
self.dashboardItems = dashboardItems
|
||||
}
|
||||
|
||||
@@ -10,10 +10,13 @@ import Fluent
|
||||
import Vapor
|
||||
|
||||
struct DashboardItem: Content {
|
||||
|
||||
var codTrackerId: String
|
||||
var title:String
|
||||
var content:String
|
||||
var title2:String? = nil
|
||||
var content2:String? = nil
|
||||
var sortOrder: Int
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user