package com.tmerclub.cloud.payment.allinpay.member.constant;

import java.util.Objects;

/**
 * @author LGH
 */

public enum VerificationCodeType {

    /**
     * 解绑手机号
     */
    UNBIND_PHONE(6),
    /**
     * 绑定手机号
     */
    BIND_PHONE(9);

    private final Integer num;

    public Integer value() {
        return num;
    }

    VerificationCodeType(Integer num) {
        this.num = num;
    }

    public static VerificationCodeType instance(Integer num) {
        for (VerificationCodeType type : values()) {
            if (Objects.equals(type.num, num)) {
                return type;
            }
        }
        return null;
    }
}
