Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4ab94de529 | ||
|
|
b3f89593fb |
@@ -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"`
|
||||||
@@ -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"`
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ func (m *MockStateHistoryRepository) GetRecentSessions(ctx context.Context, filt
|
|||||||
if maxPlayers > 0 {
|
if maxPlayers > 0 {
|
||||||
duration := int(maxDate.Sub(minDate).Minutes())
|
duration := int(maxDate.Sub(minDate).Minutes())
|
||||||
recentSessions = append(recentSessions, model.RecentSession{
|
recentSessions = append(recentSessions, model.RecentSession{
|
||||||
ID: uint(count + 1),
|
ID: entries[0].SessionID,
|
||||||
Date: minDate.Format("2006-01-02 15:04:05"),
|
Date: minDate.Format("2006-01-02 15:04:05"),
|
||||||
Type: entries[0].Session,
|
Type: entries[0].Session,
|
||||||
Track: entries[0].Track,
|
Track: entries[0].Track,
|
||||||
|
|||||||
Reference in New Issue
Block a user