feat(work): 随官方更新打卡相关接口模型

This commit is contained in:
Fu Diwei 2023-12-02 17:39:18 +08:00
parent d2ba39fbaa
commit 193f4c207f
6 changed files with 120 additions and 8 deletions

View File

@ -1,4 +1,4 @@
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/checkin/getcheckin_daydata 接口的响应。</para>
@ -301,6 +301,48 @@
[Newtonsoft.Json.JsonProperty("exception_duration")]
[System.Text.Json.Serialization.JsonPropertyName("exception_duration")]
public int[]? ExceptionDurationList { get; set; }
/// <summary>
/// 获取或设置工作日加班记为调休(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("workday_over_as_vacation")]
[System.Text.Json.Serialization.JsonPropertyName("workday_over_as_vacation")]
public int? OvertimeWorkdayTimeAsVacation { get; set; }
/// <summary>
/// 获取或设置工作日加班记为加班费(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("workday_over_as_money")]
[System.Text.Json.Serialization.JsonPropertyName("workday_over_as_money")]
public int? OvertimeWorkdayTimeAsMoney { get; set; }
/// <summary>
/// 获取或设置休息日加班记为加班费(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("restday_over_as_vacation")]
[System.Text.Json.Serialization.JsonPropertyName("restday_over_as_vacation")]
public int? OvertimeRestdayTimeAsVacation { get; set; }
/// <summary>
/// 获取或设置休息日加班记为加班费(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("restday_over_as_money")]
[System.Text.Json.Serialization.JsonPropertyName("restday_over_as_money")]
public int? OvertimeRestdayTimeAsMoney { get; set; }
/// <summary>
/// 获取或设置节假日加班记为加班费(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("holiday_over_as_vacation")]
[System.Text.Json.Serialization.JsonPropertyName("holiday_over_as_vacation")]
public int? OvertimeHolidayTimeAsVacation { get; set; }
/// <summary>
/// 获取或设置节假日加班记为加班费(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("holiday_over_as_money")]
[System.Text.Json.Serialization.JsonPropertyName("holiday_over_as_money")]
public int? OvertimeHolidayTimeAsMoney { get; set; }
}
}

View File

@ -1,4 +1,4 @@
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/checkin/getcheckin_monthdata 接口的响应。</para>
@ -144,6 +144,48 @@
[Newtonsoft.Json.JsonProperty("restdays_over_sec")]
[System.Text.Json.Serialization.JsonPropertyName("restdays_over_sec")]
public int? OvertimeRestdayTime { get; set; }
/// <summary>
/// 获取或设置工作日加班记为调休(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("workdays_over_as_vacation")]
[System.Text.Json.Serialization.JsonPropertyName("workdays_over_as_vacation")]
public int? OvertimeWorkdayTimeAsVacation { get; set; }
/// <summary>
/// 获取或设置工作日加班记为加班费(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("workdays_over_as_money")]
[System.Text.Json.Serialization.JsonPropertyName("workdays_over_as_money")]
public int? OvertimeWorkdayTimeAsMoney { get; set; }
/// <summary>
/// 获取或设置休息日加班记为加班费(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("restdays_over_as_vacation")]
[System.Text.Json.Serialization.JsonPropertyName("restdays_over_as_vacation")]
public int? OvertimeRestdayTimeAsVacation { get; set; }
/// <summary>
/// 获取或设置休息日加班记为加班费(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("restdays_over_as_money")]
[System.Text.Json.Serialization.JsonPropertyName("restdays_over_as_money")]
public int? OvertimeRestdayTimeAsMoney { get; set; }
/// <summary>
/// 获取或设置节假日加班记为加班费(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("holidays_over_as_vacation")]
[System.Text.Json.Serialization.JsonPropertyName("holidays_over_as_vacation")]
public int? OvertimeHolidayTimeAsVacation { get; set; }
/// <summary>
/// 获取或设置节假日加班记为加班费(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("holidays_over_as_money")]
[System.Text.Json.Serialization.JsonPropertyName("holidays_over_as_money")]
public int? OvertimeHolidayTimeAsMoney { get; set; }
}
}

View File

@ -1,4 +1,4 @@
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/oa/getapprovaldetail 接口的响应。</para>
@ -591,6 +591,13 @@
[System.Text.Json.Serialization.JsonPropertyName("state")]
public string State { get; set; } = default!;
/// <summary>
/// 获取或设置版本标识。
/// </summary>
[Newtonsoft.Json.JsonProperty("version")]
[System.Text.Json.Serialization.JsonPropertyName("version")]
public int? Version { get; set; }
/// <summary>
/// 获取或设置补卡时间戳。
/// </summary>
@ -598,6 +605,14 @@
[System.Text.Json.Serialization.JsonPropertyName("time")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualNullableLongConverter))]
public long? Timestamp { get; set; }
/// <summary>
/// 获取或设置补卡日期时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("daymonthyear")]
[System.Text.Json.Serialization.JsonPropertyName("daymonthyear")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.TextualNullableLongConverter))]
public long? DateTimestamp { get; set; }
}
}

View File

@ -1,4 +1,4 @@
{
{
"errcode": 0,
"errmsg": "ok",
"datas": [
@ -86,7 +86,13 @@
"ot_info": {
"ot_status": 1,
"ot_duration": 3600,
"exception_duration": []
"exception_duration": [],
"workday_over_as_vacation": 0,
"workday_over_as_money": 54000,
"restday_over_as_vacation": 0,
"restday_over_as_money": 172800,
"holiday_over_as_vacation": 0,
"holiday_over_as_money": 0
},
"sp_items": [
{

View File

@ -1,4 +1,4 @@
{
{
"errcode": 0,
"errmsg": "ok",
"datas": [
@ -56,7 +56,14 @@
}
],
"overwork_info": {
"workday_over_sec": 10800
"workday_over_sec": 54000,
"restdays_over_sec": 205560,
"workdays_over_as_vacation": 0,
"workdays_over_as_money": 54000,
"restdays_over_as_vacation": 0,
"restdays_over_as_money": 172800,
"holidays_over_as_vacation": 0,
"holidays_over_as_money": 0
}
}
]

View File

@ -838,7 +838,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.UnitTests
var model = serializer.Deserialize<DecryptChatRecordResponse>(json);
Assert.Equal("markdown", model.MessageType);
Assert.Equal("请前往系统查看,谢谢。", model.MessageContentAsInfo!.MarkdownContent);
Assert.Equal("请前往系统查看,谢谢。", model.MessageContentAsInfo!.Content);
}
AssertModelWithJsonSerializer(newtonsoftJsonSerializer);