package com.bcxin.risk.common.vo;

/**
 * @author hzp
 * 发送消息模板
 */
public enum TemplateTypeEnum {

    TKJL_NEW("TKJL_NEW",new String[]{MessageTemplate.TKJL_NEW_TITLE,MessageTemplate.TKJL_NEW_CONTENT,MessageTemplate.TKJL_NEW_KEYWORD}),

    TKQYJL_NEW("TKQYJL_NEW",new String[]{MessageTemplate.TKQYJL_NEW_TITLE,MessageTemplate.TKQYJL_NEW_CONTENT,MessageTemplate.TKQYJL_NEW_KEYWORD});

    private String key;
    private String [] template;

    TemplateTypeEnum(String key, String [] template){
        this.key=key;
        this.template=template;
    }

    public String getKey(){
        return this.key;
    }

    public String[] getTemplate(){
        return this.template;
    }

    public static String[] getAlias(String key){
        for(TemplateTypeEnum e : TemplateTypeEnum.values()){
            if(e.getKey().equals(key)){
                return e.getTemplate();
            }
        }
        return null;
    }
}
