package com.izouma.awesomeAdmin.service.sms;

import java.util.function.Supplier;

public interface SmsService {
    String sendVerify(String phone);

    void verify(String phone, String code) throws SmsVerifyException;

    class SmsVerifyException extends Exception implements Supplier<SmsVerifyException> {
        public SmsVerifyException(String msg) {
            super(msg);
        }

        @Override
        public SmsVerifyException get() {
            return this;
        }
    }
}
