Files
TakeoutSaaS.TenantApi/src/Modules/TakeoutSaaS.Module.Sms/Models/SmsSendRequest.cs
2026-02-17 12:12:01 +08:00

43 lines
1.2 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace TakeoutSaaS.Module.Sms.Models;
/// <summary>
/// 短信发送请求。
/// </summary>
public sealed class SmsSendRequest
{
/// <summary>
/// 初始化短信发送请求。
/// </summary>
/// <param name="phoneNumber">目标手机号码(含国家码,如 +86xxxxxxxxxxx。</param>
/// <param name="templateCode">模版编号。</param>
/// <param name="variables">模版变量。</param>
/// <param name="signName">短信签名。</param>
public SmsSendRequest(string phoneNumber, string templateCode, IDictionary<string, string> variables, string? signName = null)
{
PhoneNumber = phoneNumber;
TemplateCode = templateCode;
Variables = new Dictionary<string, string>(variables);
SignName = signName;
}
/// <summary>
/// 目标手机号。
/// </summary>
public string PhoneNumber { get; }
/// <summary>
/// 模版编号。
/// </summary>
public string TemplateCode { get; }
/// <summary>
/// 模版变量。
/// </summary>
public IReadOnlyDictionary<string, string> Variables { get; }
/// <summary>
/// 可选的签名。
/// </summary>
public string? SignName { get; }
}