package com.hw.nativeapp.config.enums;

public enum PutStatusTypeEnum {

    TYPE_COMPANY(0, "未提交"),
    TYPE_CUSTOMER(1, "流程中"),
    TYPE_UNKNOW(2, "已入库"),
    TYPE_CLOSE(3, "已关闭");

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

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