22 lines
501 B
Go
22 lines
501 B
Go
package stock
|
|
|
|
// StockStatus 库存状态枚举
|
|
type StockStatus int
|
|
|
|
const (
|
|
StockStatusAvailable StockStatus = 1 // 可用,未分配渠道
|
|
StockStatusSold StockStatus = 2 // 已售出
|
|
StockStatusReserved StockStatus = 3 // 预留
|
|
StockStatusLocked StockStatus = 4 // 锁定
|
|
)
|
|
|
|
// GetAllStockStatuses 获取所有库存状态
|
|
func GetAllStockStatuses() []StockStatus {
|
|
return []StockStatus{
|
|
StockStatusAvailable,
|
|
StockStatusSold,
|
|
StockStatusReserved,
|
|
StockStatusLocked,
|
|
}
|
|
}
|