package com.fzm.mall.server.admin.enums.sms;

/**
 * @author wangp
 * @date 2021/3/4 17:04
 * @description 验证码类型
 * @since JDK 1.8
 */
public enum CodeTypeEnum {

    REGISTER(1),//商户注册
    SEARCH(2),//注册进度查询
    REPAIR_PWD(3),//修改密码
    AUTHENTICATION(4);//验证身份

    private Integer type;

    CodeTypeEnum(Integer type) {
        this.type = type;
    }

    public Integer getType() {
        return type;
    }

    public static CodeTypeEnum getByType(Integer type) {
        for (CodeTypeEnum v : values()) {
            if (v.type.equals(type)) {
                return v;
            }
        }
        return null;
    }
}
