package models // WaveTaskDetail 波次任务明细表 type WaveTaskDetail struct { ID int64 `json:"id" gorm:"primarykey;comment:明细ID"` WaveTaskID int64 `json:"wave_task_id" gorm:"not null;default:0;index;comment:任务ID"` ProductID int64 `json:"product_id" gorm:"not null;default:0;index;comment:商品ID"` LocationID int64 `json:"location_id" gorm:"not null;default:0;index;comment:库位ID(入库时为上架库位,出库时为拣货库位)"` BatchNo string `json:"batch_no" gorm:"size:100;not null;default:'';comment:批次号"` PlannedQuantity int64 `json:"planned_quantity" gorm:"not null;default:0;comment:计划操作数量(最小单位)"` ActualQuantity int64 `json:"actual_quantity" gorm:"not null;default:0;comment:实际操作数量"` Status int8 `json:"status" gorm:"not null;default:1;comment:明细状态(1:待处理/pending,2:已完成/done,3:缺货/short)"` CreatedAt int64 `json:"created_at" gorm:"type:bigint;not null;default:0;comment:创建时间戳(秒)"` UpdatedAt int64 `json:"updated_at" gorm:"type:bigint;not null;default:0;comment:更新时间戳(秒)"` IsDel int8 `json:"is_del" gorm:"type:tinyint(1);not null;default:0;comment:逻辑删除标记(0:未删除,1:已删除)"` } func (WaveTaskDetail) TableName() string { return "wave_task_detail" } func (WaveTaskDetail) TableOptions() string { return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='波次任务明细表'" }