package com.cim.idm.constants.receive;

import lombok.Getter;

@Getter
public enum StorageEnums {
    GENERAL_WAREHOUSE("01", "普通仓库"),
    CONSTANT_TEMPERATURE_WAREHOUSE("02", "恒温仓库"),
    COLD_WAREHOUSE("03", "冷藏仓库"),
    DRY_FILM_WAREHOUSE("04", "干膜仓库");

    private final String code;
    private final String info;

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

    public String getStorage(String code) {
        for (StorageEnums value : StorageEnums.values()) {
            if (value.getCode().equals(code)) {
                return value.getInfo();
            }
        }
        return StorageEnums.GENERAL_WAREHOUSE.getCode();
    }
}
