Dockerfile

This commit is contained in:
2026-03-18 10:18:03 +08:00
parent 5c5dbc7420
commit b65f3439f3
189 changed files with 19027 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
package stock
// WarehouseStatus 仓库状态枚举
type WarehouseStatus string
const (
WarehouseStatusEnabled WarehouseStatus = "enable" // 启用
WarehouseStatusDisabled WarehouseStatus = "disable" // 停用
)
// GetAllWarehouseStatuses 获取所有仓库状态
func GetAllWarehouseStatuses() []WarehouseStatus {
return []WarehouseStatus{
WarehouseStatusEnabled,
WarehouseStatusDisabled,
}
}
type WarehouseStatusKeyValue struct {
Key WarehouseStatus
Value string
}
var (
WarehouseStatusEnabledKeyValue = WarehouseStatusKeyValue{Key: WarehouseStatusEnabled, Value: "启用"}
WarehouseStatusDisabledKeyValue = WarehouseStatusKeyValue{Key: WarehouseStatusDisabled, Value: "停用"}
)
func GetAllWarehouseStatusKeyValue() []WarehouseStatusKeyValue {
return []WarehouseStatusKeyValue{
WarehouseStatusEnabledKeyValue,
WarehouseStatusDisabledKeyValue,
}
}
var warehouseStatusValueMap = map[WarehouseStatus]string{
WarehouseStatusEnabled: WarehouseStatusEnabledKeyValue.Value,
WarehouseStatusDisabled: WarehouseStatusDisabledKeyValue.Value,
}
func GetWarehouseStatusValueByKey(key WarehouseStatus) (value string) {
value, exists := warehouseStatusValueMap[key]
if !exists {
value = "未知状态"
}
return
}