package com.gic.haoban.manage.api.enums;

/**
 * Created by hua on 2021/8/2.
 */
public enum AlertTypeEnum {
    QYWX_TAG_SYNC(1, "企微标签同步", null),
    QUNFA_MESSAGE(2, "企微群发", null),
    FRIEND_ADD(3, "企微好友添加", null),
    CLOUD_STORE_CHANGE(4, "观云台门店进回收站", null),
    ES_BID_PAGE(5, "es查询存在大分页", "https://oapi.dingtalk.com/robot/send?access_token=04b381d2b95816d28ed37c73d300537cbd2e67dc6670258ab85a6b3ef227d3b3"),
    GET_NEW_EXTERNAL_USERID(6, "转换外部联系人id", null),
    WEWORK_PAY(7, "向员工付款", "https://oapi.dingtalk.com/robot/send?access_token=c5b67bc21d943eca362b951c9a7030822cec63b7220feb8cdcdfbc88b6438172"),
    FEE_ALARM(8, "30天后接口许可证即将到期", "https://oapi.dingtalk.com/robot/send?access_token=8bff312a35700ae99a4b8a26d90038fe6bddc5e3e6a0a0d348c9c84c0473979a"),
    ;
    private Integer type;
    private String name;
    private String dingUrl;

    AlertTypeEnum(Integer type, String name, String dingUrl) {
        this.type = type;
        this.name = name;
        this.dingUrl = dingUrl;
    }

    public String getDingUrl() {
        return dingUrl;
    }

    public void setDingUrl(String dingUrl) {
        this.dingUrl = dingUrl;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static AlertTypeEnum getEnum(int type) {
        AlertTypeEnum[] values = AlertTypeEnum.values();
        for (AlertTypeEnum value : values) {
            if (value.getType() == type) {
                return value;
            }
        }
        return null;
    }
}
