Files
assets/model/dto/stock/inventory_warning_history_dto.go
2026-03-18 10:18:03 +08:00

118 lines
7.7 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package dto
import (
"assets/consts/stock"
"gitea.com/red-future/common/beans"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
"go.mongodb.org/mongo-driver/v2/bson"
)
// GetInventoryWarningHistoryReq 获取预警历史详情请求
type GetInventoryWarningHistoryReq struct {
g.Meta `path:"/getInventoryWarningHistory" method:"get" tags:"预警历史管理" summary:"获取预警历史详情" dc:"获取预警历史详情"`
Id *bson.ObjectID `json:"id" v:"required" dc:"预警历史ID"`
}
// GetInventoryWarningHistoryRes 获取预警历史详情响应
type GetInventoryWarningHistoryRes struct {
Id *bson.ObjectID `json:"id" dc:"预警历史ID"`
WarningType stock.WarningType `json:"warningType" dc:"预警类型"`
WarningTypeText string `json:"warningTypeText" dc:"预警类型文本"`
BatchID *bson.ObjectID `json:"batchId" dc:"批次ID"`
BatchNo string `json:"batchNo" dc:"批次号"`
AssetID *bson.ObjectID `json:"assetId" dc:"资产ID"`
AssetName string `json:"assetName" dc:"资产名称"`
AssetSkuID *bson.ObjectID `json:"assetSkuId" dc:"资产SKU ID"`
AssetSkuName string `json:"assetSkuName" dc:"资产SKU名称"`
SupplierID *bson.ObjectID `json:"supplierId" dc:"供应商ID"`
SupplierName string `json:"supplierName" dc:"供应商名称"`
BatchQty int `json:"batchQty" dc:"批次数量"`
AvailableQty int `json:"availableQty" dc:"可用数量"`
ProductionDate *gtime.Time `json:"productionDate" dc:"生产日期"`
ExpiryDate *gtime.Time `json:"expiryDate" dc:"过期日期"`
ExpiryWarningDate *gtime.Time `json:"expiryWarningDate" dc:"临期预警时间"`
MinStockThreshold int `json:"minStockThreshold" dc:"最低库存阈值"`
Status stock.ExpiryMessageStatus `json:"status" dc:"消息状态"`
StatusText string `json:"statusText" dc:"状态文本"`
ProcessedAt *gtime.Time `json:"processedAt" dc:"处理时间"`
Processor string `json:"processor" dc:"处理人"`
ProcessorName string `json:"processorName" dc:"处理人名称"`
ProcessNote string `json:"processNote" dc:"处理备注"`
ProcessMethod *stock.ExpiryProcessMethod `json:"processMethod" dc:"处理方式"`
ProcessMethodText string `json:"processMethodText" dc:"处理方式文本"`
PromotionPlanID *bson.ObjectID `json:"promotionPlanId" dc:"促销方案ID"`
SupportsRecycle bool `json:"supportsRecycle" dc:"是否支持回收"`
Notes string `json:"notes" dc:"备注"`
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
UpdatedAt *gtime.Time `json:"updatedAt" dc:"更新时间"`
}
// ListInventoryWarningHistoryReq 获取预警历史列表请求
type ListInventoryWarningHistoryReq struct {
g.Meta `path:"/listInventoryWarningHistories" method:"get" tags:"预警历史管理" summary:"获取预警历史列表" dc:"分页查询预警历史列表"`
*beans.Page
OrderBy []beans.OrderBy `json:"orderBy" dc:"排序规则"`
WarningType *stock.WarningType `json:"warningType" dc:"预警类型"`
BatchID string `json:"batchId" dc:"批次ID单个兼容旧版"`
BatchIDs []string `json:"batchIds" dc:"批次ID列表批量查询"`
AssetID string `json:"assetId" dc:"资产ID单个兼容旧版"`
AssetIDs []string `json:"assetIds" dc:"资产ID列表批量查询"`
AssetSkuID string `json:"assetSkuId" dc:"资产SKU ID单个兼容旧版"`
AssetSkuIDs []string `json:"assetSkuIds" dc:"资产SKU ID列表批量查询"`
SupplierID string `json:"supplierId" dc:"供应商ID单个兼容旧版"`
SupplierIDs []string `json:"supplierIds" dc:"供应商ID列表批量查询"`
Status *stock.ExpiryMessageStatus `json:"status" dc:"消息状态"`
ProcessMethod *stock.ExpiryProcessMethod `json:"processMethod" dc:"处理方式"`
StartDate string `json:"startDate" dc:"开始日期"`
EndDate string `json:"endDate" dc:"结束日期"`
Keyword string `json:"keyword" dc:"关键词搜索(批次号)"`
}
// ListInventoryWarningHistoryRes 获取预警历史列表响应
type ListInventoryWarningHistoryRes struct {
List []InventoryWarningHistoryListItem `json:"list" dc:"预警历史列表"`
Total int64 `json:"total" dc:"总数"`
}
// InventoryWarningHistoryListItem 预警历史列表项
type InventoryWarningHistoryListItem struct {
Id *bson.ObjectID `json:"id" dc:"预警历史ID"`
WarningType stock.WarningType `json:"warningType" dc:"预警类型"`
WarningTypeText string `json:"warningTypeText" dc:"预警类型文本"`
BatchID *bson.ObjectID `json:"batchId" dc:"批次ID"`
BatchNo string `json:"batchNo" dc:"批次号"`
AssetID *bson.ObjectID `json:"assetId" dc:"资产ID"`
AssetName string `json:"assetName" dc:"资产名称"`
AssetSkuID *bson.ObjectID `json:"assetSkuId" dc:"资产SKU ID"`
AssetSkuName string `json:"assetSkuName" dc:"资产SKU名称"`
SupplierID *bson.ObjectID `json:"supplierId" dc:"供应商ID"`
SupplierName string `json:"supplierName" dc:"供应商名称"`
BatchQty int `json:"batchQty" dc:"批次数量"`
AvailableQty int `json:"availableQty" dc:"可用数量"`
ProductionDate *gtime.Time `json:"productionDate" dc:"生产日期"`
ExpiryDate *gtime.Time `json:"expiryDate" dc:"过期日期"`
MinStockThreshold int `json:"minStockThreshold" dc:"最低库存阈值"`
Status stock.ExpiryMessageStatus `json:"status" dc:"消息状态"`
StatusText string `json:"statusText" dc:"状态文本"`
ProcessedAt *gtime.Time `json:"processedAt" dc:"处理时间"`
Processor string `json:"processor" dc:"处理人"`
ProcessorName string `json:"processorName" dc:"处理人名称"`
ProcessMethod *stock.ExpiryProcessMethod `json:"processMethod" dc:"处理方式"`
ProcessMethodText string `json:"processMethodText" dc:"处理方式文本"`
SupportsRecycle bool `json:"supportsRecycle" dc:"是否支持回收"`
CreatedAt *gtime.Time `json:"createdAt" dc:"创建时间"`
}
// DeleteInventoryWarningHistoryReq 删除预警历史请求
type DeleteInventoryWarningHistoryReq struct {
g.Meta `path:"/deleteInventoryWarningHistory" method:"delete" tags:"预警历史管理" summary:"删除预警历史" dc:"删除预警历史记录"`
Id *bson.ObjectID `json:"id" v:"required" dc:"预警历史ID"`
}
// DeleteInventoryWarningHistoryRes 删除预警历史响应
type DeleteInventoryWarningHistoryRes struct {
Id *bson.ObjectID `json:"id" dc:"预警历史ID"`
}