feat: keys, clicks, and totals in computer statistics

This commit is contained in:
trafficlunar 2025-03-22 14:20:04 +00:00
parent 19bdd27de1
commit 8407a1258f
6 changed files with 85 additions and 10 deletions

View file

@ -3,17 +3,27 @@ package model
import "time"
type ComputerWebSocketMessage struct {
Cpu uint8 `json:"cpu"`
Ram uint8 `json:"ram"`
Cpu uint8 `json:"cpu"`
Ram uint8 `json:"ram"`
Keys uint16 `json:"keys"`
Clicks uint16 `json:"clicks"`
}
type ComputerData struct {
Online bool `json:"online"`
Totals ComputerTotals `json:"totals"`
Graph []ComputerGraphData `json:"graph"`
}
type ComputerTotals struct {
Keys float64 `json:"keys"`
Clicks float64 `json:"clicks"`
}
type ComputerGraphData struct {
Timestamp time.Time `json:"timestamp"`
Cpu int `json:"cpu"`
Ram int `json:"ram"`
Keys int `json:"keys"`
Clicks int `json:"clicks"`
}