34 lines
884 B
Go
34 lines
884 B
Go
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 "未知"
|
|
}
|
|
}
|