Files
tiku-backend.net/Tiku.Application/Auth/ISmsProvider.cs
xiong c497a3ca8d
Some checks failed
ci / release-gate (push) Has been cancelled
清理代码
2026-08-03 12:31:39 +08:00

29 lines
732 B
C#

using Tiku.Domain.Tenancy;
namespace Tiku.Application.Auth;
public sealed record SmsProviderSendRequest(
Guid TenantId,
string Phone,
SmsPurpose Purpose,
string Code,
string? IpAddress,
string? UserAgent);
public sealed record SmsProviderSendResult(
string Provider,
string Status,
string? MessageId = null);
public sealed class SmsProviderException(string message, string code, Exception? innerException = null)
: AuthException(code, message)
{
public Exception? ProviderException { get; } = innerException;
}
public interface ISmsProvider
{
Task<SmsProviderSendResult> SendAsync(
SmsProviderSendRequest request,
CancellationToken cancellationToken = default);
}