package com.hw.nativeapp.config.enums;

public enum PutTypeEnum {

    //物流支付方 1 公司 2 客户
    TYPE_COMPANY(0, "采购入库"),
    TYPE_CUSTOMER(1, "退货入库"),
    TYPE_UNKNOW(2, "瑕疵入库");

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

    public static String getNameByType(Integer type){
        for (PutTypeEnum item : PutTypeEnum.values()){
            if (item.type.equals(type)){
                return item.getName();
            }
        }
        return PutTypeEnum.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;
    }
}
