namespace Hotline.Push
{
    public interface IMessageCodeDomainService
    {
        /// <summary>
        /// 生成验证码
        /// </summary>
        /// <param name="PhoneNum"></param>
        /// <returns></returns>
        Task<string> GenerateVerificationCode(string UserName, CancellationToken cancellation);

        /// <summary>
        /// 校验验证码 
        /// </summary>
        /// <param name="PhoneNo"></param>
        /// <param name="Code"></param>
        /// <param name="cancellation"></param>
        /// <returns></returns>
        Task CheckdCode(string UserName, string PhoneNo, string Code, CancellationToken cancellation);

        /// <summary>
        /// 验证白名单
        /// </summary>
        /// <param name="UserName"></param>
        /// <returns></returns>
        Task<bool> VerifyWhitelistAsync(string UserName);
    }
}
