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; } + } +}