Dockerfile
This commit is contained in:
33
consts/stock/inventory_count_status.go
Normal file
33
consts/stock/inventory_count_status.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package stock
|
||||
|
||||
// InventoryCountStatus 库存盘点状态枚举
|
||||
type InventoryCountStatus int
|
||||
|
||||
const (
|
||||
InventoryCountStatusInProgress InventoryCountStatus = 1 // 进行中
|
||||
InventoryCountStatusCompleted InventoryCountStatus = 2 // 已完成
|
||||
InventoryCountStatusCancelled InventoryCountStatus = 3 // 已取消
|
||||
)
|
||||
|
||||
// GetAllInventoryCountStatuses 获取所有盘点状态
|
||||
func GetAllInventoryCountStatuses() []InventoryCountStatus {
|
||||
return []InventoryCountStatus{
|
||||
InventoryCountStatusInProgress,
|
||||
InventoryCountStatusCompleted,
|
||||
InventoryCountStatusCancelled,
|
||||
}
|
||||
}
|
||||
|
||||
// String 获取盘点状态字符串表示
|
||||
func (i InventoryCountStatus) String() string {
|
||||
switch i {
|
||||
case InventoryCountStatusInProgress:
|
||||
return "进行中"
|
||||
case InventoryCountStatusCompleted:
|
||||
return "已完成"
|
||||
case InventoryCountStatusCancelled:
|
||||
return "已取消"
|
||||
default:
|
||||
return "未知"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user