package models import ( "time" "git.apinb.com/bsm-sdk/core/database" ) // GasorderTrackPoint 对应 gasorder_track_point,保存不可变配送位置点。 type GasorderTrackPoint struct { Entity // 公共实体字段 GasorderTrackID uint64 `gorm:"column:gasorder_track_id;not null;index" json:"gasorder_track_id"` // 轨迹自增主键 Longitude string `gorm:"column:longitude;type:varchar(32);not null" json:"longitude"` // 经度 Latitude string `gorm:"column:latitude;type:varchar(32);not null" json:"latitude"` // 纬度 OccurredAt time.Time `gorm:"column:occurred_at;type:timestamptz;not null;index" json:"occurred_at"` // 定位发生时间 Source string `gorm:"column:source;type:varchar(32);not null;default:'gps'" json:"source"` // 定位来源 Accuracy string `gorm:"column:accuracy;type:varchar(32);not null;default:''" json:"accuracy"` // 定位精度 } func init() { database.AppendMigrate(&GasorderTrackPoint{}) } func (table *GasorderTrackPoint) TableName() string { return "gasorder_track_point" }