Skip to content

Commit 3a27a7b

Browse files
committed
feat(work): 随官方更新人事助手获取员工字段配置接口模型
1 parent 26615e8 commit 3a27a7b

2 files changed

Lines changed: 54 additions & 0 deletions

File tree

src/SKIT.FlurlHttpClient.Wechat.Work/Models/CgibinHr/CgibinHrGetFieldsResponse.cs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,26 @@ public static class Types
1313
{
1414
public class Field
1515
{
16+
public static class Types
17+
{
18+
public class Option
19+
{
20+
/// <summary>
21+
/// 获取或设置选项的枚举值。
22+
/// </summary>
23+
[Newtonsoft.Json.JsonProperty("id")]
24+
[System.Text.Json.Serialization.JsonPropertyName("id")]
25+
public int OptionId { get; set; }
26+
27+
/// <summary>
28+
/// 获取或设置选项的文本内容。
29+
/// </summary>
30+
[Newtonsoft.Json.JsonProperty("value")]
31+
[System.Text.Json.Serialization.JsonPropertyName("value")]
32+
public string Value { get; set; } = default!;
33+
}
34+
}
35+
1636
/// <summary>
1737
/// 获取或设置字段 ID。
1838
/// </summary>
@@ -34,12 +54,26 @@ public class Field
3454
[System.Text.Json.Serialization.JsonPropertyName("field_type")]
3555
public int FieldType { get; set; }
3656

57+
/// <summary>
58+
/// 获取或设置字段值类型。
59+
/// </summary>
60+
[Newtonsoft.Json.JsonProperty("value_type")]
61+
[System.Text.Json.Serialization.JsonPropertyName("value_type")]
62+
public int ValueType { get; set; }
63+
3764
/// <summary>
3865
/// 获取或设置是否必须。
3966
/// </summary>
4067
[Newtonsoft.Json.JsonProperty("is_must")]
4168
[System.Text.Json.Serialization.JsonPropertyName("is_must")]
4269
public bool IsMust { get; set; }
70+
71+
/// <summary>
72+
/// 获取或设置选项列表。
73+
/// </summary>
74+
[Newtonsoft.Json.JsonProperty("option_list")]
75+
[System.Text.Json.Serialization.JsonPropertyName("option_list")]
76+
public Types.Option[]? OptionList { get; set; }
4377
}
4478
}
4579

test/SKIT.FlurlHttpClient.Wechat.Work.UnitTests/ModelSamples/_/CgibinHr/CgibinHrGetFieldsResponse.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,32 @@
1010
"fieldid": 11001,
1111
"field_name": "姓名",
1212
"field_type": 1,
13+
"value_type": 1,
1314
"is_must": true
1415
},
1516
{
1617
"fieldid": 11002,
1718
"field_name": "别名",
1819
"field_type": 1,
20+
"value_type": 1,
1921
"is_must": false
22+
},
23+
{
24+
"fieldid": 12010,
25+
"field_name": "职位",
26+
"field_type": 2,
27+
"value_type": 3,
28+
"is_must": false,
29+
"option_list": [
30+
{
31+
"id": 1,
32+
"value": "总经理"
33+
},
34+
{
35+
"id": 2,
36+
"value": "秘书"
37+
}
38+
]
2039
}
2140
]
2241
},
@@ -28,6 +47,7 @@
2847
"fieldid": 12024,
2948
"field_name": "工号",
3049
"field_type": 1,
50+
"value_type": 1,
3151
"is_must": true
3252
}
3353
]

0 commit comments

Comments
 (0)