20 lines
901 B
Go
20 lines
901 B
Go
|
|
package models
|
|||
|
|
|
|||
|
|
import (
|
|||
|
|
"git.apinb.com/bsm-sdk/core/database"
|
|||
|
|
"time"
|
|||
|
|
)
|
|||
|
|
|
|||
|
|
// DeliveryTrackPoint 对应 delivery_track_point,保存配送节点和位置。
|
|||
|
|
type DeliveryTrackPoint struct {
|
|||
|
|
Entity
|
|||
|
|
DeliveryTrackID uint64 `gorm:"column:delivery_track_id;not null;index" json:"delivery_track_id"`
|
|||
|
|
PointType string `gorm:"column:point_type;type:varchar(32);not null" json:"point_type"`
|
|||
|
|
OccurredAt time.Time `gorm:"column:occurred_at;type:timestamptz;not null" json:"occurred_at"`
|
|||
|
|
Longitude string `gorm:"column:longitude;type:varchar(32);not null;default:''" json:"longitude"`
|
|||
|
|
Latitude string `gorm:"column:latitude;type:varchar(32);not null;default:''" json:"latitude"`
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
func init() { database.AppendMigrate(&DeliveryTrackPoint{}) }
|
|||
|
|
func (table *DeliveryTrackPoint) TableName() string { return "delivery_track_point" }
|