UserinfoGetResult.cs 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. #region Apache License Version 2.0
  2. /*----------------------------------------------------------------
  3. Copyright 2019 Jeffrey Su & Suzhou Senparc Network Technology Co.,Ltd.
  4. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
  5. except in compliance with the License. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software distributed under the
  8. License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
  9. either express or implied. See the License for the specific language governing permissions
  10. and limitations under the License.
  11. Detail: https://github.com/JeffreySu/WeiXinMPSDK/blob/master/license.md
  12. ----------------------------------------------------------------*/
  13. #endregion Apache License Version 2.0
  14. /*----------------------------------------------------------------
  15. Copyright (C) 2019 Senparc
  16. 文件名:UserinfoGetResult.cs
  17. 文件功能描述:枚举类型
  18. 创建标识:Senparc - 20160308
  19. 修改标识:Senparc - 20160505
  20. 修改描述:注销UserinfoGetResult.custom_field_list属性,正确的位置应放到UserinfoGetResult_UserInfo 对象中。感谢@hello2008zj
  21. ----------------------------------------------------------------*/
  22. using System;
  23. using System.Collections.Generic;
  24. using System.Linq;
  25. using System.Text;
  26. using System.Threading.Tasks;
  27. using Senparc.Weixin.Entities;
  28. namespace Senparc.Weixin.MP.AdvancedAPIs.Card
  29. {
  30. /// <summary>
  31. /// 会员信息
  32. /// </summary>
  33. public class UserinfoGetResult : WxJsonResult
  34. {
  35. /// <summary>
  36. /// 用户在本公众号内唯一识别码
  37. /// </summary>
  38. public string openid { get; set; }
  39. /// <summary>
  40. /// 用户昵称
  41. /// </summary>
  42. public string nickname { get; set; }
  43. /// <summary>
  44. /// membership_number
  45. /// </summary>
  46. public string membership_number { get; set; }
  47. /// <summary>
  48. /// 积分信息
  49. /// </summary>
  50. public int bonus { get; set; }
  51. /// <summary>
  52. /// 用户性别,如MALE
  53. /// </summary>
  54. public string sex { get; set; }
  55. /// <summary>
  56. /// 会员信息
  57. /// </summary>
  58. public UserinfoGetResult_UserInfo user_info { get; set; }
  59. ///// <summary>
  60. ///// 开发者设置的会员卡会员信息类目,如等级。
  61. ///// </summary>
  62. //public List<string> custom_field_list { get; set; }
  63. /// <summary>
  64. /// 当前用户的会员卡状态
  65. /// </summary>
  66. public UserCardStatus user_card_status { get; set; }
  67. /// <summary>
  68. /// 该卡是否已经被激活,true表示已经被激活,false表示未被激活
  69. /// </summary>
  70. public bool has_active { get; set; }
  71. }
  72. public class UserinfoGetResult_UserInfo
  73. {
  74. /// <summary>
  75. ///
  76. /// </summary>
  77. public List<UserinfoGetResult_UserInfo_Item> common_field_list { get; set; }
  78. /// <summary>
  79. /// 开发者设置的会员卡会员信息类目,如等级。
  80. /// </summary>
  81. public List<UserinfoGetResult_UserInfo_Item> custom_field_list { get; set; }
  82. }
  83. /// <summary>
  84. /// 获取用户开卡时提交的信息
  85. /// </summary>
  86. public class GetActivateTempInfoResultJson : WxJsonResult
  87. {
  88. /// <summary>
  89. /// 会员信息
  90. /// </summary>
  91. public UserinfoGetResult_UserInfo info { get; set; }
  92. }
  93. public class UserinfoGetResult_UserInfo_Item
  94. {
  95. /// <summary>
  96. /// 会员信息类目名称
  97. /// </summary>
  98. public string name { get; set; }
  99. /// <summary>
  100. /// 会员卡信息类目值,比如等级值等
  101. /// </summary>
  102. public string value { get; set; }
  103. /// <summary>
  104. /// 填写项目为多选时的返回
  105. /// </summary>
  106. public List<string> value_list { get; set; }
  107. }
  108. }