refactor: train with regionid.
This commit is contained in:
@@ -58,6 +58,7 @@ type TrainRecord struct {
|
||||
Duration int `gorm:"type:int" json:"duration"` // 持续时间(秒)
|
||||
PeopleNum int `gorm:"type:int" json:"peopleNum"`
|
||||
Evaluation string `gorm:"size:50" json:"evaluation"`
|
||||
RegionID uint32 `gorm:"default:0" json:"regionId"`
|
||||
Belts []Belt `gorm:"many2many:train_record_belts;" json:"belts"` // 多对多关联[4](@ref)
|
||||
HeartRates []HeartRate `gorm:"foreignKey:TrainId;references:TrainId" json:"heart_rates"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user