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

26 lines
1.6 KiB
Go

package models
// WaveHeader 波次主表
type WaveHeader struct {
ID int64 `json:"id" gorm:"primarykey;comment:波次ID"`
WaveNo string `json:"wave_no" gorm:"size:100;not null;default:'';uniqueIndex;comment:波次号"`
Direction int8 `json:"direction" gorm:"not null;default:0;index;comment:波次方向(1:入库/inbound,2:出库/outbound)"`
Type int8 `json:"type" gorm:"not null;default:1;comment:波次类型(1:普通/normal,2:紧急/urgent,3:批量/batch)"`
WarehouseID int64 `json:"warehouse_id" gorm:"not null;default:0;index;comment:所属仓库ID"`
RelatedOrderID int64 `json:"related_order_id" gorm:"not null;default:0;index;comment:关联订单ID"`
Status int8 `json:"status" gorm:"not null;default:1;index;comment:状态(1:已创建/created,2:已下发/released,3:拣货中/picking,4:已完成/completed,5:已取消/cancelled)"`
Creator string `json:"creator" gorm:"size:100;not null;default:'';comment:创建人"`
CreatorID int64 `json:"creator_id" gorm:"not null;default:0;comment:创建人ID"`
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 (WaveHeader) TableName() string {
return "wave_header"
}
func (WaveHeader) TableOptions() string {
return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='波次主表'"
}