feat(api): add client app service endpoints
This commit is contained in:
@@ -9,12 +9,16 @@ import (
|
||||
// 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"` // 定位精度
|
||||
GasorderTrackID uint64 `gorm:"column:gasorder_track_id;not null;index" json:"gasorder_track_id"` // 轨迹自增主键
|
||||
RequestNo string `gorm:"column:request_no;type:varchar(128);not null;default:'';uniqueIndex:,where:request_no <> ''" json:"request_no"` // 上报幂等号
|
||||
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"` // 定位发生时间
|
||||
ReceivedAt time.Time `gorm:"column:received_at;type:timestamptz;not null;index" json:"received_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"` // 定位精度
|
||||
Speed string `gorm:"column:speed;type:varchar(32);not null;default:''" json:"speed"` // 定位速度
|
||||
Direction string `gorm:"column:direction;type:varchar(32);not null;default:''" json:"direction"` // 定位方向
|
||||
}
|
||||
|
||||
func init() { database.AppendMigrate(&GasorderTrackPoint{}) }
|
||||
|
||||
Reference in New Issue
Block a user