Files
platforms/backend/api/internal/models/gasorder_track_point.go

22 lines
1.1 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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" }