From f51a4a4d66cdda3b34f87d063b7169f2e818f16d Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Fri, 17 Dec 2021 21:14:09 +0800 Subject: [PATCH] =?UTF-8?q?feat(work):=20=E6=96=B0=E5=A2=9E=E4=BC=9A?= =?UTF-8?q?=E8=AE=AE=E5=AE=A4=E9=A2=84=E5=AE=9A=E7=9A=84=E5=9B=9E=E8=B0=83?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=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/OA/BookMeetingRoomEvent.cs | 25 +++++++++++++++++++ .../Events/OA/CancelMeetingRoomEvent.cs | 25 +++++++++++++++++++ .../EventSamples/OA/BookMeetingRoomEvent.xml | 9 +++++++ .../OA/CancelMeetingRoomEvent.xml | 9 +++++++ 4 files changed, 68 insertions(+) create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Work/Events/OA/BookMeetingRoomEvent.cs create mode 100644 src/SKIT.FlurlHttpClient.Wechat.Work/Events/OA/CancelMeetingRoomEvent.cs create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/EventSamples/OA/BookMeetingRoomEvent.xml create mode 100644 test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/EventSamples/OA/CancelMeetingRoomEvent.xml diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Events/OA/BookMeetingRoomEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Events/OA/BookMeetingRoomEvent.cs new file mode 100644 index 00000000..dc4ef716 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Events/OA/BookMeetingRoomEvent.cs @@ -0,0 +1,25 @@ +namespace SKIT.FlurlHttpClient.Wechat.Work.Events +{ + /// + /// 表示 EVENT.book_meeting_room 事件的数据。 + /// REF: https://open.work.weixin.qq.com/api/doc/90000/90135/95333 + /// + public class BookMeetingRoomEvent : WechatWorkEvent, WechatWorkEvent.Serialization.IJsonSerializable, WechatWorkEvent.Serialization.IXmlSerializable + { + /// + /// 获取或设置会议室 ID。 + /// + [Newtonsoft.Json.JsonProperty("MeetingRoomId")] + [System.Text.Json.Serialization.JsonPropertyName("MeetingRoomId")] + [System.Xml.Serialization.XmlElement("MeetingRoomId")] + public int MeetingRoomId { get; set; } + + /// + /// 获取或设置会议 ID。 + /// + [Newtonsoft.Json.JsonProperty("MeetingId")] + [System.Text.Json.Serialization.JsonPropertyName("MeetingId")] + [System.Xml.Serialization.XmlElement("MeetingId")] + public string MeetingId { get; set; } = default!; + } +} diff --git a/src/SKIT.FlurlHttpClient.Wechat.Work/Events/OA/CancelMeetingRoomEvent.cs b/src/SKIT.FlurlHttpClient.Wechat.Work/Events/OA/CancelMeetingRoomEvent.cs new file mode 100644 index 00000000..88a9f1f8 --- /dev/null +++ b/src/SKIT.FlurlHttpClient.Wechat.Work/Events/OA/CancelMeetingRoomEvent.cs @@ -0,0 +1,25 @@ +namespace SKIT.FlurlHttpClient.Wechat.Work.Events +{ + /// + /// 表示 EVENT.cancel_meeting_room 事件的数据。 + /// REF: https://open.work.weixin.qq.com/api/doc/90000/90135/95333 + /// + public class CancelMeetingRoomEvent : WechatWorkEvent, WechatWorkEvent.Serialization.IJsonSerializable, WechatWorkEvent.Serialization.IXmlSerializable + { + /// + /// 获取或设置会议室 ID。 + /// + [Newtonsoft.Json.JsonProperty("MeetingRoomId")] + [System.Text.Json.Serialization.JsonPropertyName("MeetingRoomId")] + [System.Xml.Serialization.XmlElement("MeetingRoomId")] + public int MeetingRoomId { get; set; } + + /// + /// 获取或设置会议 ID。 + /// + [Newtonsoft.Json.JsonProperty("MeetingId")] + [System.Text.Json.Serialization.JsonPropertyName("MeetingId")] + [System.Xml.Serialization.XmlElement("MeetingId")] + public string MeetingId { get; set; } = default!; + } +} diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/EventSamples/OA/BookMeetingRoomEvent.xml b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/EventSamples/OA/BookMeetingRoomEvent.xml new file mode 100644 index 00000000..cf5c9e32 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/EventSamples/OA/BookMeetingRoomEvent.xml @@ -0,0 +1,9 @@ + + + + 1348831860 + + + 1 + + \ No newline at end of file diff --git a/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/EventSamples/OA/CancelMeetingRoomEvent.xml b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/EventSamples/OA/CancelMeetingRoomEvent.xml new file mode 100644 index 00000000..cf5c9e32 --- /dev/null +++ b/test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/EventSamples/OA/CancelMeetingRoomEvent.xml @@ -0,0 +1,9 @@ + + + + 1348831860 + + + 1 + + \ No newline at end of file