feat: finalize core modules and gateway
This commit is contained in:
44
src/Modules/TakeoutSaaS.Module.Sms/Models/SmsSendRequest.cs
Normal file
44
src/Modules/TakeoutSaaS.Module.Sms/Models/SmsSendRequest.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
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; }
|
||||
}
|
||||
Reference in New Issue
Block a user