From b3f89593fb83d78e7538cc64c1825f121d257e79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=20Jurmanovi=C4=87?= Date: Sun, 14 Sep 2025 17:08:50 +0200 Subject: [PATCH] replace id type --- local/model/state_history_stats.go | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/local/model/state_history_stats.go b/local/model/state_history_stats.go index 140cb18..a501e5d 100644 --- a/local/model/state_history_stats.go +++ b/local/model/state_history_stats.go @@ -1,5 +1,7 @@ package model +import "github.com/google/uuid" + type SessionCount struct { Name string `json:"name"` Count int `json:"count"` @@ -7,30 +9,30 @@ type SessionCount struct { type DailyActivity struct { Date string `json:"date"` - SessionsCount int `json:"sessionsCount"` + SessionsCount int `json:"sessionsCount"` } type PlayerCountPoint struct { - Timestamp string `json:"timestamp"` - Count float64 `json:"count"` + Timestamp string `json:"timestamp"` + Count float64 `json:"count"` } type StateHistoryStats struct { - AveragePlayers float64 `json:"averagePlayers"` - PeakPlayers int `json:"peakPlayers"` - TotalSessions int `json:"totalSessions"` - TotalPlaytime int `json:"totalPlaytime" gorm:"-"` // in minutes + AveragePlayers float64 `json:"averagePlayers"` + PeakPlayers int `json:"peakPlayers"` + TotalSessions int `json:"totalSessions"` + TotalPlaytime int `json:"totalPlaytime" gorm:"-"` // in minutes PlayerCountOverTime []PlayerCountPoint `json:"playerCountOverTime" gorm:"-"` SessionTypes []SessionCount `json:"sessionTypes" gorm:"-"` DailyActivity []DailyActivity `json:"dailyActivity" gorm:"-"` RecentSessions []RecentSession `json:"recentSessions" gorm:"-"` -} +} type RecentSession struct { - ID uint `json:"id"` + ID uuid.UUID `json:"id"` Date string `json:"date"` Type string `json:"type"` Track string `json:"track"` Duration int `json:"duration"` Players int `json:"players"` -} \ No newline at end of file +}