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

This commit is contained in:
Fu Diwei 2022-10-12 16:37:24 +08:00
parent 4eff478dbb
commit dfb8f0e58f
4 changed files with 82 additions and 32 deletions

View File

@ -11,5 +11,19 @@
[Newtonsoft.Json.JsonProperty("schedule_id")] [Newtonsoft.Json.JsonProperty("schedule_id")]
[System.Text.Json.Serialization.JsonPropertyName("schedule_id")] [System.Text.Json.Serialization.JsonPropertyName("schedule_id")]
public string ScheduleId { get; set; } = string.Empty; public string ScheduleId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置操作模式。
/// </summary>
[Newtonsoft.Json.JsonProperty("op_mode")]
[System.Text.Json.Serialization.JsonPropertyName("op_mode")]
public int? OperateMode { get; set; }
/// <summary>
/// 获取或设置操作起始时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("op_start_time")]
[System.Text.Json.Serialization.JsonPropertyName("op_start_time")]
public long? OperateStartTimestamp { get; set; }
} }
} }

View File

@ -86,14 +86,46 @@ namespace SKIT.FlurlHttpClient.Wechat.Work.Models
public IList<Types.Attendee>? AttendeeList { get; set; } public IList<Types.Attendee>? AttendeeList { get; set; }
/// <summary> /// <summary>
/// 获取或设置是否忽略参与者字段 /// 获取或设置是否允许非参与人主动加入日程
/// </summary> /// </summary>
[Newtonsoft.Json.JsonProperty("skip_attendees")] [Newtonsoft.Json.JsonProperty("allow_active_join")]
[System.Text.Json.Serialization.JsonPropertyName("skip_attendees")] [System.Text.Json.Serialization.JsonPropertyName("allow_active_join")]
public bool? RequireSkipAttendees { get; set; } public bool? IsAllowActiveJoin { get; set; }
/// <summary>
/// 获取或设置是否只允许组织者发起群聊。
/// </summary>
[Newtonsoft.Json.JsonProperty("only_organizer_create_chat")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("only_organizer_create_chat")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))]
public bool? IsOnlyOrganizerCreateChat { get; set; }
} }
} }
/// <summary>
/// 获取或设置是否忽略参与者字段。
/// </summary>
[Newtonsoft.Json.JsonProperty("skip_attendees")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalNullableBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("skip_attendees")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalNullableBooleanConverter))]
public bool? IsSkipAttendees { get; set; }
/// <summary>
/// 获取或设置操作模式。
/// </summary>
[Newtonsoft.Json.JsonProperty("op_mode")]
[System.Text.Json.Serialization.JsonPropertyName("op_mode")]
public int? OperateMode { get; set; }
/// <summary>
/// 获取或设置操作起始时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("op_start_time")]
[System.Text.Json.Serialization.JsonPropertyName("op_start_time")]
public long? OperateStartTimestamp { get; set; }
/// <summary> /// <summary>
/// 获取或设置日程信息。 /// 获取或设置日程信息。
/// </summary> /// </summary>

View File

@ -1,3 +1,5 @@
{ {
"schedule_id": "17c7d2bd9f20d652840f72f59e796AAA" "schedule_id": "17c7d2bd9f20d652840f72f59e796AAA",
"op_mode": 1,
"op_start_time": 1571274600
} }

View File

@ -1,29 +1,31 @@
{ {
"schedule": { "skip_attendees": 0,
"organizer": "userid1", "op_mode": 1,
"schedule_id": "17c7d2bd9f20d652840f72f59e796AAA", "op_start_time": 1571274600,
"start_time": 1571274600, "schedule": {
"end_time": 1571320210, "organizer": "userid1",
"attendees": [ "schedule_id": "17c7d2bd9f20d652840f72f59e796AAA",
{ "start_time": 1571274600,
"userid": "userid2" "end_time": 1571320210,
} "attendees": [{
], "userid": "userid2"
"summary": "test_summary", }],
"description": "test_description", "summary": "test_summary",
"reminders": { "description": "test_description",
"is_remind": 1, "reminders": {
"remind_before_event_secs": 3600, "is_remind": 1,
"is_repeat": 1, "remind_before_event_secs": 3600,
"repeat_type": 7, "is_repeat": 1,
"repeat_until": 1606976813, "repeat_type": 7,
"is_custom_repeat": 1, "repeat_until": 1606976813,
"repeat_interval": 1, "is_custom_repeat": 1,
"repeat_day_of_week": [3, 7], "repeat_interval": 1,
"repeat_day_of_month": [10, 21], "repeat_day_of_week": [3, 7],
"timezone": 8 "repeat_day_of_month": [10, 21],
}, "timezone": 8
"location": "test_place", },
"skip_attendees": true "location": "test_place",
} "allow_active_join": true,
"only_organizer_create_chat": 1
}
} }