package com.crm.rely.backend.core.constant;

/**
 * 代理关闭功能
 *
 * @author y
 * @create 2022/1/21
 */
public enum AgentCloseFunctionsType {


    INNER_TRANSFER("5", "INNER_TRANSFER"),
    OPEN_SUB_CID("6", "OPEN_SUB_CID");


    private final String code;
    private final String desc;

    AgentCloseFunctionsType(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static AgentCloseFunctionsType matchCode(String code) {
        for (AgentCloseFunctionsType type : AgentCloseFunctionsType.values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return null;
    }


}
