1
This commit is contained in:
52
Models/WeChatTemplateMessage.cs
Normal file
52
Models/WeChatTemplateMessage.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System.Text.Json.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using WeChatSharp.Interfaces;
|
||||
|
||||
namespace WeChatSharp;
|
||||
|
||||
public struct WeChatTemplateMessageData
|
||||
{
|
||||
public WeChatTemplateMessageData(string value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 值
|
||||
/// </summary>
|
||||
public string value { get; set; }
|
||||
}
|
||||
public struct WeChatTemplateMessage: IWeChatTemplateMessage
|
||||
{
|
||||
[JsonProperty("touser")]
|
||||
public string ToUser { get; set; }
|
||||
[JsonProperty("template_id")]
|
||||
public string TemplateId { get; set; }
|
||||
[JsonProperty("url")]
|
||||
public string Url { get; set; }
|
||||
[JsonProperty("client_msg_id")]
|
||||
public string ClientMsgId { get; set; }
|
||||
[JsonProperty("data")]
|
||||
public IDictionary<string, WeChatTemplateMessageData> Data { get; set; }
|
||||
}
|
||||
// {
|
||||
// "touser":"oY0tZ6_aqq_MEWsej9zJEY6OVspI",
|
||||
// "template_id":"TA6ogf8kMiB31M0oQ8WCxteITUauajrtuGL1LtptNg0",
|
||||
// "url":"http://weixin.qq.com/download",
|
||||
// "client_msg_id":"MSG_000002",
|
||||
// "data":{
|
||||
//
|
||||
// "character_string5":{
|
||||
// "value":"202307251515"
|
||||
// },
|
||||
// "thing4": {
|
||||
// "value":"已创建"
|
||||
// },
|
||||
// "thing9": {
|
||||
// "value":"CAICT"
|
||||
// },
|
||||
// "phrase13":{
|
||||
// "value":"手动提交"
|
||||
// }
|
||||
// }
|
||||
// }
|
Reference in New Issue
Block a user