29 lines
1.7 KiB
Go
29 lines
1.7 KiB
Go
package models
|
|
|
|
// StockCheck 盘库单主表
|
|
type StockCheck struct {
|
|
ID int64 `json:"id" gorm:"primarykey;comment:盘库单ID"`
|
|
CheckNo string `json:"check_no" gorm:"size:50;not null;uniqueIndex;comment:盘库单号"`
|
|
WarehouseID int64 `json:"warehouse_id" gorm:"not null;default:0;index;comment:仓库ID"`
|
|
CheckType int8 `json:"check_type" gorm:"type:tinyint(3);not null;default:1;comment:盘点类型:1=全盘,2=抽盘"`
|
|
Status int8 `json:"status" gorm:"type:tinyint(3);not null;default:1;index;comment:状态:1=待盘点,2=盘点中,3=已完成,4=已取消"`
|
|
TotalItems int `json:"total_items" gorm:"not null;default:0;comment:总商品数"`
|
|
CheckedItems int `json:"checked_items" gorm:"not null;default:0;comment:已盘商品数"`
|
|
TotalQuantity int64 `json:"total_quantity" gorm:"not null;default:0;comment:系统总数量"`
|
|
ActualQuantity int64 `json:"actual_quantity" gorm:"not null;default:0;comment:实盘总数量"`
|
|
Operator string `json:"operator" gorm:"size:100;comment:创建人"`
|
|
OperatorID int64 `json:"operator_id" gorm:"not null;default:0;comment:创建人ID"`
|
|
Remark string `json:"remark" gorm:"size:500;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 (StockCheck) TableName() string {
|
|
return "stock_check"
|
|
}
|
|
|
|
func (StockCheck) TableOptions() string {
|
|
return "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='盘库单主表'"
|
|
}
|