Skip to content

Commit 3bb5a0c

Browse files
committed
feat(work): 随官方更新打卡相关接口模型
1 parent ff25144 commit 3bb5a0c

File tree

3 files changed

+64
-2
lines changed

3 files changed

+64
-2
lines changed

src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinCheckin/Option/CgibinCheckinAddCheckinOptionRequest.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,26 @@ public class TimeRule
165165

166166
public class CheckinTime
167167
{
168+
public static class Types
169+
{
170+
public class RestTime
171+
{
172+
/// <summary>
173+
/// 获取或设置休息开始时间距当天零点的秒数。
174+
/// </summary>
175+
[Newtonsoft.Json.JsonProperty("rest_begin_time")]
176+
[System.Text.Json.Serialization.JsonPropertyName("rest_begin_time")]
177+
public int BeginTime { get; set; }
178+
179+
/// <summary>
180+
/// 获取或设置休息结束时间距当天零点的秒数。
181+
/// </summary>
182+
[Newtonsoft.Json.JsonProperty("rest_end_time")]
183+
[System.Text.Json.Serialization.JsonPropertyName("rest_end_time")]
184+
public int EndTime { get; set; }
185+
}
186+
}
187+
168188
/// <summary>
169189
/// 获取或设置时段 ID。
170190
/// </summary>
@@ -249,6 +269,13 @@ public class CheckinTime
249269
[System.Text.Json.Serialization.JsonPropertyName("rest_end_time")]
250270
public int? RestEndTime { get; set; }
251271

272+
/// <summary>
273+
/// 获取或设置多组休息时间列表。
274+
/// </summary>
275+
[Newtonsoft.Json.JsonProperty("rest_times")]
276+
[System.Text.Json.Serialization.JsonPropertyName("rest_times")]
277+
public IList<Types.RestTime>? RestTimeList { get; set; }
278+
252279
/// <summary>
253280
/// 获取或设置是否不需要上班打卡。
254281
/// </summary>

src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinCheckin/Option/CgibinCheckinGetCheckinOptionResponse.cs

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System.Collections.Generic;
2+
13
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
24
{
35
/// <summary>
@@ -69,6 +71,26 @@ public class CheckinDate
6971

7072
public class CheckinTime
7173
{
74+
public static class Types
75+
{
76+
public class RestTime
77+
{
78+
/// <summary>
79+
/// 获取或设置休息开始时间距当天零点的秒数。
80+
/// </summary>
81+
[Newtonsoft.Json.JsonProperty("rest_begin_time")]
82+
[System.Text.Json.Serialization.JsonPropertyName("rest_begin_time")]
83+
public int BeginTime { get; set; }
84+
85+
/// <summary>
86+
/// 获取或设置休息结束时间距当天零点的秒数。
87+
/// </summary>
88+
[Newtonsoft.Json.JsonProperty("rest_end_time")]
89+
[System.Text.Json.Serialization.JsonPropertyName("rest_end_time")]
90+
public int EndTime { get; set; }
91+
}
92+
}
93+
7294
/// <summary>
7395
/// 获取或设置时段 ID。
7496
/// </summary>
@@ -153,6 +175,13 @@ public class CheckinTime
153175
[System.Text.Json.Serialization.JsonPropertyName("rest_end_time")]
154176
public int? RestEndTime { get; set; }
155177

178+
/// <summary>
179+
/// 获取或设置多组休息时间列表。
180+
/// </summary>
181+
[Newtonsoft.Json.JsonProperty("rest_times")]
182+
[System.Text.Json.Serialization.JsonPropertyName("rest_times")]
183+
public Types.RestTime[]? RestTimeList { get; set; }
184+
156185
/// <summary>
157186
/// 获取或设置是否不需要上班打卡。
158187
/// </summary>

test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/CgibinCheckin/Option/CgibinCheckinGetCheckinOptionResponse.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
{
22
"errcode": 0,
33
"errmsg": "ok",
44
"info": [
@@ -97,7 +97,13 @@
9797
"remind_off_work_sec": 61200,
9898
"rest_begin_time": 43200,
9999
"rest_end_time": 46800,
100-
"allow_rest": false
100+
"allow_rest": false,
101+
"rest_times": [
102+
{
103+
"rest_begin_time": 47400,
104+
"rest_end_time": 48000
105+
}
106+
]
101107
}
102108
],
103109
"limit_aheadtime": 14400000,

0 commit comments

Comments
 (0)