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

20 lines
901 B
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 (
"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" }