package com.hw.nativeapp.config.enums;

public enum StockOutTypeEnum {
    TYPE_EXPRESS(0, "快递"),
    TYPE_MENTION(1, "自提"),
    TYPE_SF(2, "顺丰直发"),
    TYPE_UNKNOW(99, "未知");

    StockOutTypeEnum(Integer type, String name){
        this.type = type;
        this.name = name;
    }

    public static String getNameByType(Integer type){
        for (StockOutTypeEnum item : StockOutTypeEnum.values()){
            if (item.type.equals(type)){
                return item.getName();
            }
        }
        return TYPE_UNKNOW.getName();
    }

    private Integer type;
    private String name;

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
