package cn.axzo.msg.center.notices.common.enums;

import cn.azxo.framework.common.model.EnumBase;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * 渠道处理枚举类
 *
 * @author zhaoyong
 * @see ChannelHandlerEnum
 * @since 2021-08-19 11:37
 */
@RequiredArgsConstructor
@Getter
public enum ChannelHandlerEnum implements EnumBase<String> {

  /**
   * 渠道对应处理类
   */
  ALI_YUN("aliyun", "aliyunSmsSendManager", "阿里云"),
  CHUANG_LAN("chuanglan", "chuangLanSmsSendManager", "创蓝"),
  SUB_MAIL("sub_mail", "subMailSmsSendManager", "赛邮"),
  LIAN_LU("lian_lu", "lianLuSmsSendManager", "联麓"),
  REGULATORY_GAOXIN("regulatory_gaoxin", "regulatoryGaoxinManager", "监管机构: 高新")
  ;

  private final String code;
  private final String message;
  private final String desc;

  public static ChannelHandlerEnum getByCode(String code) {
    for (ChannelHandlerEnum value : ChannelHandlerEnum.values()) {
      if (value.getCode().equals(code)) {
        return value;
      }
    }
    return null;
  }

}
