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

21 lines
1.2 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 (
"time"
"git.apinb.com/bsm-sdk/core/database"
)
// GasorderTrack 对应 gasorder_track保存一次配送尝试的轨迹摘要。
type GasorderTrack struct {
Entity // 公共实体字段
GasorderBasicID uint64 `gorm:"column:gasorder_basic_id;not null;index;uniqueIndex:idx_gasorder_track_attempt" json:"gasorder_basic_id"` // 订单自增主键
StaffAccountID uint64 `gorm:"column:staff_account_id;not null;index" json:"staff_account_id"` // 配送人员自增主键
AttemptNo int `gorm:"column:attempt_no;not null;uniqueIndex:idx_gasorder_track_attempt" json:"attempt_no"` // 配送尝试序号
StartedAt time.Time `gorm:"column:started_at;type:timestamptz;not null;index" json:"started_at"` // 开始时间
CompletedAt *time.Time `gorm:"column:completed_at;type:timestamptz" json:"completed_at"` // 到达时间
}
func init() { database.AppendMigrate(&GasorderTrack{}) }
func (table *GasorderTrack) TableName() string { return "gasorder_track" }