refactor platform logic and add gasorder domain
This commit is contained in:
21
backend/api/internal/models/gasorder_track_point.go
Normal file
21
backend/api/internal/models/gasorder_track_point.go
Normal file
@@ -0,0 +1,21 @@
|
||||
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" }
|
||||
Reference in New Issue
Block a user