21 lines
1.2 KiB
Go
21 lines
1.2 KiB
Go
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" }
|