add state history
This commit is contained in:
@@ -31,11 +31,6 @@ type PlayerState struct {
|
||||
IsConnected bool
|
||||
}
|
||||
|
||||
type AccServerInstance struct {
|
||||
Model *Server
|
||||
State *ServerState
|
||||
}
|
||||
|
||||
type State struct {
|
||||
Session string `json:"session"`
|
||||
SessionStart time.Time `json:"sessionStart"`
|
||||
@@ -53,4 +48,12 @@ type ServerState struct {
|
||||
MaxConnections int `json:"maxConnections"`
|
||||
// Players map[int]*PlayerState
|
||||
// etc.
|
||||
}
|
||||
|
||||
type StateHistory struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
ServerID uint `json:"serverId" gorm:"not null"`
|
||||
Session string `json:"session"`
|
||||
PlayerCount int `json:"playerCount"`
|
||||
DateCreated time.Time `json:"dateCreated"`
|
||||
}
|
||||
Reference in New Issue
Block a user