daShangDao_psiServer/models/outbound_order.go
2026-06-27 17:16:36 +08:00

29 lines
1.9 KiB
Go

package models
// OutboundOrder 出库单主表
type OutboundOrder struct {
ID int64 `json:"id" gorm:"primarykey;comment:出库单ID"`
OutNo string `json:"out_no" gorm:"size:100;not null;default:'';uniqueIndex;comment:出库单号"`
WaveTaskID int64 `json:"wave_task_id" gorm:"not null;default:0;index;comment:波次任务ID"`
WarehouseID int64 `json:"warehouse_id" gorm:"not null;default:0;comment:仓库ID"`
ShopId int64 `json:"shop_id" gorm:"type:bigint(20);default:0;comment:店铺ID"`
CustomerID int64 `json:"customer_id" gorm:"not null;default:0;comment:客户ID"`
TotalQuantity int64 `json:"total_quantity" gorm:"not null;default:0;comment:出库总数量"`
TotalAmount int64 `json:"total_amount" gorm:"not null;default:0;comment:出库总金额(分)"`
Status int8 `json:"status" gorm:"not null;default:1;index;comment:状态(1:已创建,2:拣货中,3:已完成,4:已取消,5:发货中,6:已发货)"`
Operator string `json:"operator" gorm:"size:100;not null;default:'';comment:操作员"`
OperatorID int64 `json:"operator_id" gorm:"not null;default:0;comment:操作员ID"`
Remark string `json:"remark" gorm:"size:255;not null;default:'';comment:备注"`
CreatedAt int64 `json:"created_at" gorm:"type:bigint;not null;default:0;index:idx_oo_del_shop_time;priority:3;index:idx_oo_del_time;priority:2;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;index:idx_oo_del_shop_time;priority:1;index:idx_oo_del_time;priority:1;comment:逻辑删除标记(0:未删除,1:已删除)"`
}
func (OutboundOrder) TableName() string {
return "outbound_order"
}
func (OutboundOrder) TableOptions() string {
return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='出库单主表'"
}