From 4536fdae6ce19dbb15dedd279c1a691ce0aace6a Mon Sep 17 00:00:00 2001 From: Kane Date: Mon, 6 Feb 2023 10:34:46 +0800 Subject: [PATCH] =?UTF-8?q?feat(wxapi):=20=E6=96=B0=E5=A2=9E=E9=93=BE?= =?UTF-8?q?=E6=8E=A5=E6=B6=88=E6=81=AF=E5=9B=9E=E8=B0=83=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Events/MpMessage/LinkMessageEvent.cs | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/LinkMessageEvent.cs diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/LinkMessageEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/LinkMessageEvent.cs new file mode 100644 index 00000000..fdb80043 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/LinkMessageEvent.cs @@ -0,0 +1,65 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 LINK 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html#%E9%93%BE%E6%8E%A5%E6%B6%88%E6%81%AF + /// + public class LinkMessageEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable + { + /// + /// 获取或设置消息 ID。 + /// + [Newtonsoft.Json.JsonProperty("MsgId")] + [System.Text.Json.Serialization.JsonPropertyName("MsgId")] + [System.Xml.Serialization.XmlElement("MsgId")] + public long MessageId { get; set; } + + /// + /// 获取或设置消息标题。 + /// + [Newtonsoft.Json.JsonProperty("Title")] + [System.Text.Json.Serialization.JsonPropertyName("Title")] + [System.Xml.Serialization.XmlElement("Title")] + public string Title { get; set; } = default!; + + /// + /// 获取或设置消息描述。 + /// + [Newtonsoft.Json.JsonProperty("Description")] + [System.Text.Json.Serialization.JsonPropertyName("Description")] + [System.Xml.Serialization.XmlElement("Description")] + public string Description { get; set; } = default!; + + /// + /// 获取或设置消息链接。 + /// + [Newtonsoft.Json.JsonProperty("Url")] + [System.Text.Json.Serialization.JsonPropertyName("Url")] + [System.Xml.Serialization.XmlElement("Url")] + public string Url { get; set; } = default!; + + /// + /// 获取或设置消息数据 ID。 + /// + [Newtonsoft.Json.JsonProperty("MsgDataId")] + [System.Text.Json.Serialization.JsonPropertyName("MsgDataId")] + [System.Xml.Serialization.XmlElement("MsgDataId", IsNullable = true)] + public string? MessageDataId { get; set; } + + /// + /// 获取或设置图文顺序索引(从 1 开始)。 + /// + [Newtonsoft.Json.JsonProperty("Idx")] + [System.Text.Json.Serialization.JsonPropertyName("Idx")] + [System.Xml.Serialization.XmlElement("Idx", IsNullable = true)] + public int? Index { get; set; } + + /// + /// 获取或设置客服子商户 ID。 + /// + [Newtonsoft.Json.JsonProperty("BusinessId")] + [System.Text.Json.Serialization.JsonPropertyName("BusinessId")] + [System.Xml.Serialization.XmlElement("BusinessId", IsNullable = true)] + public long? BusinessId { get; set; } + } +}