20 lines
1.1 KiB
Go
20 lines
1.1 KiB
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"` // delivery_track_id 业务字段
|
||
PointType string `gorm:"column:point_type;type:varchar(32);not null" json:"point_type"` // point_type 业务字段
|
||
OccurredAt time.Time `gorm:"column:occurred_at;type:timestamptz;not null" json:"occurred_at"` // occurred_at 业务字段
|
||
Longitude string `gorm:"column:longitude;type:varchar(32);not null;default:''" json:"longitude"` // longitude 业务字段
|
||
Latitude string `gorm:"column:latitude;type:varchar(32);not null;default:''" json:"latitude"` // latitude 业务字段
|
||
}
|
||
|
||
func init() { database.AppendMigrate(&DeliveryTrackPoint{}) }
|
||
func (table *DeliveryTrackPoint) TableName() string { return "delivery_track_point" }
|