package com.jwipc.order.constant;

import lombok.Getter;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
@Getter
public enum LabelPrintSettingType {
    INNER_AND_OUT(1, "内外箱"),
    INNER(2, "内箱"),
    API(3, "接口打印");
    private final int type;
    private final String title;

    LabelPrintSettingType(int type, String title) {
        this.type = type;
        this.title = title;
    }

    public static LabelPrintSettingType getByType(int type) {
        for (LabelPrintSettingType labelPrintSettingType : values()) {
            if (labelPrintSettingType.getType() == type) {
                return labelPrintSettingType;
            }
        }
        return null;
    }
}
