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

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

/**
 * 消息渠道
 *
 * @Author: LiuYang
 * @Date: 2021/5/24 16:39
 */
@RequiredArgsConstructor
@Getter
public enum MessageChannelEnum implements EnumBase<String> {

  /**
   * 消息渠道
   */
  ALIYUN("aliyun", "阿里云"),
  CHUANG_LAN("chuanglan", "创蓝云智"),
  SUB_MAIL("sub_mail", "赛邮"),
  LIAN_LU("lian_lu", "联麓"),
  REGULATORY_GAOXIN("regulatory_gaoxin", "监管机构: 高新")
  ;

  private final String code;
  private final String message;

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

}
