package com.hw.common.core.enums;

import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * 库位状态
 *
 * @author xins
 */
public enum WmsLocationStatus
{
    NORMAL("1", "正常"), AUTOLOCK("2", "自动锁定"), MANUALLOCK("3", "人工锁定"),
    MOVELOCK("4", "移库锁定"), MERGELOCK("5", "合库锁定");

    private final String code;
    private final String info;

    // 属性值与属性名Map
    public static final Map<String, String> locationStatusMap = Arrays.stream(values()).collect(
            Collectors.toMap(
                    WmsLocationStatus::getCode,
                    WmsLocationStatus::getInfo
            )
    );

    WmsLocationStatus(String code, String info)
    {
        this.code = code;
        this.info = info;
    }

    public String getCode()
    {
        return code;
    }

    public String getInfo()
    {
        return info;
    }
}
