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

/**
 * 邮件订阅类型
 *
 * @author y
 * @create 2022/1/9
 */
public enum EmailSubscribeType {
    //交易日报
    DAILY_CONFIRMATION(1, "DAILY_CONFIRMATION");


    private final Integer code;
    private final String desc;

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

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static EmailSubscribeType matchCode(Integer code){
        for(EmailSubscribeType type : EmailSubscribeType.values()){
            if(type.getCode() ==  code){
                return type;
            }
        }
        return null;
    }

}
