feat(openai): 新增反序列化回调通知事件得扩展方法

This commit is contained in:
Fu Diwei
2021-10-09 12:53:21 +08:00
parent 77968c3c3a
commit cf49b5fe83
6 changed files with 576 additions and 6 deletions

View File

@@ -0,0 +1,38 @@
using System;
using System.Xml.Serialization;
namespace SKIT.FlurlHttpClient.Wechat.OpenAI
{
/// <summary>
/// 表示微信智能对话 API 回调通知事件的基类。
/// </summary>
[Serializable]
public class WechatOpenAIEvent
{
public static class Serialization
{
[XmlRoot("xml")]
public interface IXmlSerializable
{
}
}
/// <summary>
/// 获取或设置 AppId。
/// </summary>
[XmlElement("appid", IsNullable = true)]
public string? AppId { get; set; }
/// <summary>
/// 获取或设置事件类型。
/// </summary>
[XmlElement("event", IsNullable = true)]
public string? Event { get; set; }
/// <summary>
/// 获取或设置消息创建时间戳。
/// </summary>
[XmlElement("createtime", IsNullable = true)]
public long? CreateTimestamp { get; set; }
}
}