Add state

This commit is contained in:
Henri Burau
2024-06-03 23:54:45 +02:00
parent ca04cc51f3
commit a793da1307
30 changed files with 553 additions and 88 deletions

View File

@ -11,27 +11,29 @@ import (
type MapScoreList []MapScore
type Capture struct {
Id uint
ID int64 `bun:",pk,autoincrement"`
Host string
Port string
Name string
Active bool
Start time.Time
MapScores MapScoreList
MapScores MapScoreList `bun:"rel:has-many,join:id=capture_id"`
}
type MapScore struct {
Id uint
ID int64 `bun:",pk,autoincrement"`
CaptureID int64 `bun:"capture_id"`
StartTime time.Time
Map string
ScoreList []Score
ScoreList []Score `bun:"rel:has-many,join:id=mapscore_id"`
}
type Score struct {
Id uint
Name string
Score int
Ping int
ID int64 `bun:",pk,autoincrement"`
MapScoreID int64 `bun:"mapscore_id"`
Name string
Score int
Ping int
}
type ResultTable struct {