package com.cool.store.enums;


/**
 * 发货项类型枚举
 */
public enum DeliveryItemTypeEnum {

    PURCHASE_DEVICE(1, "采购设备"),
    FIRE_CODE_DEVICE(2, "火码设备");

    private final Integer code;
    private final String desc;

    DeliveryItemTypeEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static DeliveryItemTypeEnum getByCode(Integer code) {
        for (DeliveryItemTypeEnum item : values()) {
            if (item.getCode().equals(code)) {
                return item;
            }
        }
        return null;
    }
}