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

20 lines
1.1 KiB
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"` // 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" }