15 lines
607 B
Go
15 lines
607 B
Go
package db
|
||
|
||
import "time"
|
||
|
||
// SpeedTestResult 一次完整的测速结果记录
|
||
type SpeedTestResult struct {
|
||
ID uint `gorm:"primaryKey" json:"id"`
|
||
ClientIP string `gorm:"size:64;index" json:"client_ip"`
|
||
LatencyMs float64 `json:"latency_ms"` // 延迟(毫秒,取中位数)
|
||
JitterMs float64 `json:"jitter_ms"` // 抖动(毫秒,平均绝对偏差)
|
||
DownloadMbps float64 `json:"download_mbps"` // 下载速度(Mbps)
|
||
UploadMbps float64 `json:"upload_mbps"` // 上传速度(Mbps)
|
||
CreatedAt time.Time `gorm:"index" json:"created_at"`
|
||
}
|