replace id type
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
package model
|
package model
|
||||||
|
|
||||||
|
import "github.com/google/uuid"
|
||||||
|
|
||||||
type SessionCount struct {
|
type SessionCount struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Count int `json:"count"`
|
Count int `json:"count"`
|
||||||
@@ -7,19 +9,19 @@ type SessionCount struct {
|
|||||||
|
|
||||||
type DailyActivity struct {
|
type DailyActivity struct {
|
||||||
Date string `json:"date"`
|
Date string `json:"date"`
|
||||||
SessionsCount int `json:"sessionsCount"`
|
SessionsCount int `json:"sessionsCount"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PlayerCountPoint struct {
|
type PlayerCountPoint struct {
|
||||||
Timestamp string `json:"timestamp"`
|
Timestamp string `json:"timestamp"`
|
||||||
Count float64 `json:"count"`
|
Count float64 `json:"count"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type StateHistoryStats struct {
|
type StateHistoryStats struct {
|
||||||
AveragePlayers float64 `json:"averagePlayers"`
|
AveragePlayers float64 `json:"averagePlayers"`
|
||||||
PeakPlayers int `json:"peakPlayers"`
|
PeakPlayers int `json:"peakPlayers"`
|
||||||
TotalSessions int `json:"totalSessions"`
|
TotalSessions int `json:"totalSessions"`
|
||||||
TotalPlaytime int `json:"totalPlaytime" gorm:"-"` // in minutes
|
TotalPlaytime int `json:"totalPlaytime" gorm:"-"` // in minutes
|
||||||
PlayerCountOverTime []PlayerCountPoint `json:"playerCountOverTime" gorm:"-"`
|
PlayerCountOverTime []PlayerCountPoint `json:"playerCountOverTime" gorm:"-"`
|
||||||
SessionTypes []SessionCount `json:"sessionTypes" gorm:"-"`
|
SessionTypes []SessionCount `json:"sessionTypes" gorm:"-"`
|
||||||
DailyActivity []DailyActivity `json:"dailyActivity" gorm:"-"`
|
DailyActivity []DailyActivity `json:"dailyActivity" gorm:"-"`
|
||||||
@@ -27,7 +29,7 @@ type StateHistoryStats struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type RecentSession struct {
|
type RecentSession struct {
|
||||||
ID uint `json:"id"`
|
ID uuid.UUID `json:"id"`
|
||||||
Date string `json:"date"`
|
Date string `json:"date"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Track string `json:"track"`
|
Track string `json:"track"`
|
||||||
|
|||||||
Reference in New Issue
Block a user