package cn.palmte.work.bean;

/**
 * @author xiongshiyan at 2021/11/1 , contact me with email yanshixiong@126.com or phone 15208384257
 */
public enum CooperateTypeEnum {
    PLAN_O(-1,""),
    PLAN_A(1,"战略合作类"),
    PLAN_B(2,"非战略合作类");

    private int cooperateType;
    private String cooperateTypeStr;

    private CooperateTypeEnum(int cooperateType, String cooperateTypeStr) {
        this.cooperateType = cooperateType;
        this.cooperateTypeStr = cooperateTypeStr;
    }

    public int getCooperateType() {
        return cooperateType;
    }

    public void setCooperateType(int cooperateType) {
        this.cooperateType = cooperateType;
    }

    public String getCooperateTypeStr() {
        return cooperateTypeStr;
    }

    public void setCooperateTypeStr(String cooperateTypeStr) {
        this.cooperateTypeStr = cooperateTypeStr;
    }

    public static CooperateTypeEnum parseCooperateType(int cooperateType){
        if(cooperateType == 1){
            return PLAN_A;
        }
        if(cooperateType == 2){
            return PLAN_B;
        }
        throw new IllegalArgumentException("Unkown cooperateType:"+cooperateType);
    }
}
