GetRosterMetaResponse.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. // Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
  2. //
  3. // 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
  4. //
  5. // 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
  6. using Admin.NET.Plugin.DingTalk.RequestProxy.BaseTypes;
  7. using System.Text.Json.Serialization;
  8. namespace Admin.NET.Plugin.DingTalk.RequestProxy.HRM.DTO;
  9. /// <summary>
  10. /// 获取花名册元数据
  11. /// </summary>
  12. public class GetRosterMetaResponse : DingtalkResponseErrorResultRequestId<List<RosterMetaResult>>
  13. {
  14. /// <summary>
  15. /// 接口调用是否成功
  16. /// </summary>
  17. [JsonProperty("success")]
  18. [JsonPropertyName("success")]
  19. public virtual bool Success { get; set; }
  20. }
  21. public class RosterMetaResult
  22. {
  23. /// <summary>
  24. /// 分组是否支持明细
  25. /// </summary>
  26. [JsonProperty("detail")]
  27. [JsonPropertyName("detail")]
  28. public bool Detail { get; set; }
  29. /// <summary>
  30. /// 花名册分组内字段定义
  31. /// </summary>
  32. [JsonProperty("field_meta_info_list")]
  33. [JsonPropertyName("field_meta_info_list")]
  34. public List<RosterMetaFieldInfo> FieldMetaInfoList { get; set; }
  35. /// <summary>
  36. /// 分组标识
  37. /// </summary>
  38. [JsonProperty("group_id")]
  39. [JsonPropertyName("group_id")]
  40. public string GroupId { get; set; }
  41. /// <summary>
  42. /// 分组名称
  43. /// </summary>
  44. [JsonProperty("group_name")]
  45. [JsonPropertyName("group_name")]
  46. public string GroupName { get; set; }
  47. }
  48. public class RosterMetaFieldInfo
  49. {
  50. /// <summary>
  51. /// 是否衍生字段,例如司龄、年龄等系统计算的字段
  52. /// </summary>
  53. [JsonProperty("derived")]
  54. [JsonPropertyName("derived")]
  55. public bool Derived { get; set; }
  56. /// <summary>
  57. /// 字段标识
  58. /// </summary>
  59. [JsonProperty("field_code")]
  60. [JsonPropertyName("field_code")]
  61. public string FieldCode { get; set; }
  62. /// <summary>
  63. /// 字段名称
  64. /// </summary>
  65. [JsonProperty("field_name")]
  66. [JsonPropertyName("field_name")]
  67. public string FieldName { get; set; }
  68. /// <summary>
  69. /// 可用选项的序列化结果
  70. /// </summary>
  71. [JsonProperty("option_text")]
  72. [JsonPropertyName("option_text")]
  73. public string? OptionText { get; set; }
  74. }
  75. /// <summary>
  76. /// 可用选项的反序列化类型
  77. /// </summary>
  78. public class OptionTextDomain
  79. {
  80. [JsonProperty("label")]
  81. [JsonPropertyName("label")]
  82. public string Label { get; set; }
  83. [JsonProperty("value")]
  84. [JsonPropertyName("value")]
  85. public string Value { get; set; }
  86. }