package cn.palmte.work.bean;

/**
 * @author xiongshiyan at 2021/11/1 , contact me with email yanshixiong@126.com or phone 15208384257
 */
public enum TypeEnum {
    PROJECT_INTEGRATION(1,"工程集成类"),
    DEVICE_INTEGRATION(2,"设备集成类"),
    STRATEGIC_PARTNER(3,"战略合作类");

    private int type;
    private String typeDesc;

    private TypeEnum(int type, String typeDesc) {
        this.type = type;
        this.typeDesc = typeDesc;
    }

    public int getType() {
        return type;
    }

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

    public String getTypeDesc() {
        return typeDesc;
    }

    public void setTypeDesc(String typeDesc) {
        this.typeDesc = typeDesc;
    }

    public static TypeEnum parseType(int type){
        if(type == 1){
            return PROJECT_INTEGRATION;
        }
        if(type == 2){
            return DEVICE_INTEGRATION;
        }
        if(type == 3){
            return STRATEGIC_PARTNER;
        }
        throw new IllegalArgumentException("Unkown type:"+type);
    }
}
