refactor platform logic and add gasorder domain

This commit is contained in:
david
2026-07-28 10:42:26 +08:00
parent 8c6d52cf8c
commit 899fc6186b
44 changed files with 1636 additions and 1446 deletions

View File

@@ -0,0 +1,20 @@
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" }