daShangDao_psiServer/models/wave_task.go
2026-06-15 13:47:39 +08:00

30 lines
2.0 KiB
Go
Raw Permalink 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
// WaveTask 波次任务表
type WaveTask struct {
ID int64 `json:"id" gorm:"primarykey;comment:任务ID"`
WaveID int64 `json:"wave_id" gorm:"not null;default:0;index;comment:所属波次ID关联wave_header可获知方向"`
CarId int64 `json:"car_id" gorm:"not null;default:0;comment:小车ID"`
CarCode int64 `json:"car_code" gorm:"not null;default:0;comment:小车编号"`
CarCapacity int64 `json:"car_capacity" gorm:"not null;default:0;comment:小车容量"`
TaskNo string `json:"task_no" gorm:"size:100;not null;default:'';uniqueIndex;comment:任务编号"`
Type int8 `json:"type" gorm:"not null;default:1;comment:任务类型(1:拣货/pick-出库,2:补货/replenish,3:移库/move,4:上架/putaway-入库)"`
Assignee string `json:"assignee" gorm:"size:100;not null;default:'';index;comment:指派人"`
AssigneeID int64 `json:"assignee_id" gorm:"not null;default:0;comment:指派人ID"`
Status int8 `json:"status" gorm:"not null;default:1;index;comment:任务状态(1:待指派/pending,2:已指派/assigned,3:拣货中/picking,4:已完成/completed,5:已取消/cancelled)"`
StartedAt int64 `json:"started_at" gorm:"not null;default:0;comment:开始时间戳(秒)"`
CompletedAt int64 `json:"completed_at" gorm:"not null;default:0;comment:完成时间戳(秒)"`
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:已删除)"`
IsForce int8 `json:"is_force" gorm:"type:tinyint(1);not null;default:0;comment:是否强制完成 0 否 1是"`
}
func (WaveTask) TableName() string {
return "wave_task"
}
func (WaveTask) TableOptions() string {
return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='波次任务表'"
}