32 lines
2.0 KiB
Go
32 lines
2.0 KiB
Go
package models
|
|
|
|
// StockCheckItem 盘库单明细表
|
|
type StockCheckItem struct {
|
|
ID int64 `json:"id" gorm:"primarykey;comment:明细ID"`
|
|
StockCheckID int64 `json:"stock_check_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;comment:库位ID"`
|
|
BatchNo string `json:"batch_no" gorm:"size:100;not null;default:'';comment:批次号"`
|
|
ProductionDate int64 `json:"production_date" gorm:"not null;default:0;comment:生产日期时间戳(秒)"`
|
|
ExpiryDate int64 `json:"expiry_date" gorm:"not null;default:0;comment:有效期时间戳(秒)"`
|
|
SystemQuantity int64 `json:"system_quantity" gorm:"not null;default:0;comment:系统数量"`
|
|
ActualQuantity int64 `json:"actual_quantity" gorm:"comment:实盘数量"`
|
|
DifferenceQuantity int64 `json:"difference_quantity" gorm:"comment:差异数量"`
|
|
Status int8 `json:"status" gorm:"type:tinyint(3);not null;default:1;index;comment:状态:1=待盘点,2=已盘点"`
|
|
CheckOperator string `json:"check_operator" gorm:"size:100;comment:盘点人"`
|
|
CheckOperatorID int64 `json:"check_operator_id" gorm:"not null;default:0;comment:盘点人ID"`
|
|
CheckTime int64 `json:"check_time" gorm:"not null;default:0;comment:盘点时间戳(秒)"`
|
|
Remark string `json:"remark" gorm:"size:255;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;index;comment:更新时间戳(秒)"`
|
|
IsDel int8 `json:"is_del" gorm:"type:tinyint(3);not null;default:0;comment:逻辑删除标记(0:未删除,1:已删除)"`
|
|
}
|
|
|
|
func (StockCheckItem) TableName() string {
|
|
return "stock_check_item"
|
|
}
|
|
|
|
func (StockCheckItem) TableOptions() string {
|
|
return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='盘库单明细表'"
|
|
}
|