package entity import ( "assets/consts/public" "assets/consts/stock" "gitea.com/red-future/common/beans" "github.com/gogf/gf/v2/os/gtime" "go.mongodb.org/mongo-driver/v2/bson" ) // InventoryWarningHistory 库存预警历史归档实体 type InventoryWarningHistory struct { beans.MongoBaseDO `bson:",inline"` // 预警类型 WarningType stock.WarningType `bson:"warningType" json:"warningType"` // 预警类型 BatchID *bson.ObjectID `bson:"batchId" json:"batchId"` AssetID *bson.ObjectID `bson:"assetId" json:"assetId"` AssetSkuID *bson.ObjectID `bson:"assetSkuId" json:"assetSkuId"` SupplierID *bson.ObjectID `bson:"supplierId" json:"supplierId"` BatchNo string `bson:"batchNo" json:"batchNo"` BatchQty int `bson:"batchQty" json:"batchQty"` AvailableQty int `bson:"availableQty" json:"availableQty"` ProductionDate *gtime.Time `bson:"productionDate" json:"productionDate"` ExpiryDate *gtime.Time `bson:"expiryDate" json:"expiryDate"` ExpiryWarningDate *gtime.Time `bson:"expiryWarningDate" json:"expiryWarningDate"` MinStockThreshold int `bson:"minStockThreshold" json:"minStockThreshold"` // 最低库存阈值 Status stock.ExpiryMessageStatus `bson:"status" json:"status"` ProcessedAt *gtime.Time `bson:"processedAt" json:"processedAt"` Processor string `bson:"processor" json:"processor"` ProcessNote string `bson:"processNote" json:"processNote"` ProcessMethod *stock.ExpiryProcessMethod `bson:"processMethod" json:"processMethod"` PromotionPlanID string `bson:"promotionPlanId" json:"promotionPlanId"` SupportsRecycle bool `bson:"supportsRecycle" json:"supportsRecycle"` Notes string `bson:"notes" json:"notes"` } // CollectionName 获取集合名称 func (InventoryWarningHistory) CollectionName() string { return public.InventoryWarningHistoryCollection }