From 8911c6708ae0865f877d114f0575e665b743889e Mon Sep 17 00:00:00 2001 From: laoboli <1293528695@qq.com> Date: Thu, 20 Mar 2025 16:42:27 +0800 Subject: [PATCH] feat: predict value. --- models/training.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/models/training.go b/models/training.go index fdd5a44..67b0625 100644 --- a/models/training.go +++ b/models/training.go @@ -21,12 +21,13 @@ type Belt struct { // 对应Flutter的HeartRate结构 type HeartRate struct { gorm.Model - TrainId uint `gorm:"column:train_id; index" json:"trainId"` // 外键关联训练记录[4](@ref) - BeltId uint `gorm:"column:belt_id;index" json:"bid"` // 对应Dart的bid字段 - BeltAddr string `gorm:"column:belt_addr;size:255" json:"beltAddr"` // 对应Dart的beltAddr字段 - Time int64 `gorm:"type:bigint" json:"time"` // 保持与前端一致的毫秒时间戳[3](@ref) - Value int `gorm:"type:int" json:"value"` - Identifier string `gorm:"uniqueIndex;type:varchar(255)" json:"identifier"` + TrainId uint `gorm:"column:train_id; index" json:"trainId"` // 外键关联训练记录[4](@ref) + BeltId uint `gorm:"column:belt_id;index" json:"bid"` // 对应Dart的bid字段 + BeltAddr string `gorm:"column:belt_addr;size:255" json:"beltAddr"` // 对应Dart的beltAddr字段 + Time int64 `gorm:"type:bigint" json:"time"` // 保持与前端一致的毫秒时间戳[3](@ref) + Value int `gorm:"type:int" json:"value"` + PredictValue int `gorm:"type:int" json:"predictValue"` + Identifier string `gorm:"uniqueIndex;type:varchar(255)" json:"identifier"` } // 对应Flutter的TrainRecord结构