diff --git a/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/MiniProgramPageMessageEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/MiniProgramPageMessageEvent.cs new file mode 100644 index 00000000..dc57eb79 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Api/Events/MpMessage/MiniProgramPageMessageEvent.cs @@ -0,0 +1,57 @@ +namespace SKIT.FlurlHttpClient.Wechat.Api.Events +{ + /// + /// 表示 MINIPROGRAMPAGE 事件的数据。 + /// REF: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_standard_messages.html#%E6%96%87%E6%9C%AC%E6%B6%88%E6%81%AF + /// + public class MiniProgramPageMessageEvent : 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; } + + /// + /// 获取或设置小程序 AppId。 + /// + [Newtonsoft.Json.JsonProperty("AppId")] + [System.Text.Json.Serialization.JsonPropertyName("AppId")] + [System.Xml.Serialization.XmlElement("AppId")] + public string MiniProgramAppId { get; set; } = default!; + + /// + /// 获取或设置小程序标题。 + /// + [Newtonsoft.Json.JsonProperty("Title")] + [System.Text.Json.Serialization.JsonPropertyName("Title")] + [System.Xml.Serialization.XmlElement("Title")] + public string MiniProgramTitle { get; set; } = default!; + + /// + /// 获取或设置小程序页面路径。 + /// + [Newtonsoft.Json.JsonProperty("PagePath")] + [System.Text.Json.Serialization.JsonPropertyName("PagePath")] + [System.Xml.Serialization.XmlElement("PagePath")] + public string MiniProgramPagePath { get; set; } = default!; + + /// + /// 获取或设置小程序缩略图 URL。 + /// + [Newtonsoft.Json.JsonProperty("ThumbUrl")] + [System.Text.Json.Serialization.JsonPropertyName("ThumbUrl")] + [System.Xml.Serialization.XmlElement("ThumbUrl")] + public string MiniProgramThumbnailUrl { get; set; } = default!; + + /// + /// 获取或设置小程序缩略图 MediaId。 + /// + [Newtonsoft.Json.JsonProperty("ThumbMediaId")] + [System.Text.Json.Serialization.JsonPropertyName("ThumbMediaId")] + [System.Xml.Serialization.XmlElement("ThumbMediaId", IsNullable = true)] + public string? MiniProgramThumbnailMediaId { get; set; } + } +}