ActivateUserFormSetData.cs 3.9 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. 文件名:ActivateUserFormSetData.cs
  17. 文件功能描述:会员卡设置开卡字段需要的数据
  18. 创建标识:Senparc - 20150910
  19. 修改标识:Senparc - 20160808
  20. 修改描述:修改BaseForm
  21. ----------------------------------------------------------------*/
  22. using System.Collections.Generic;
  23. namespace Senparc.Weixin.MP.AdvancedAPIs.Card
  24. {
  25. /// <summary>
  26. /// 会员卡设置开卡字段需要的数据
  27. /// </summary>
  28. public class ActivateUserFormSetData
  29. {
  30. /// <summary>
  31. /// 卡券ID
  32. /// </summary>
  33. public string card_id { get; set; }
  34. /// <summary>
  35. /// 会员卡激活时的必填选项
  36. /// </summary>
  37. public BaseForm required_form { get; set; }
  38. /// <summary>
  39. /// 会员卡激活时的选填项
  40. /// </summary>
  41. public BaseForm optional_form { get; set; }
  42. }
  43. public class BaseForm
  44. {
  45. /// <summary>
  46. /// 微信格式化的选项类型
  47. /// USER_FORM_INFO_FLAG_MOBILE 手机号
  48. /// USER_FORM_INFO_FLAG_NAME 姓名
  49. /// USER_FORM_INFO_FLAG_BIRTHDAY 生日
  50. /// USER_FORM_INFO_FLAG_IDCARD 身份证
  51. /// USER_FORM_INFO_FLAG_EMAIL 邮箱
  52. /// USER_FORM_INFO_FLAG_DETAIL_LOCATION 详细地址
  53. /// USER_FORM_INFO_FLAG_EDUCATION_BACKGROUND 教育背景
  54. /// USER_FORM_INFO_FLAG_CAREER 职业
  55. /// USER_FORM_INFO_FLAG_INDUSTRY 行业
  56. /// USER_FORM_INFO_FLAG_INCOME 收入
  57. /// USER_FORM_INFO_FLAG_HABIT 兴趣爱好
  58. /// </summary>
  59. public string[] common_field_id_list { get; set; }
  60. /// <summary>
  61. /// 自定义选项名称
  62. /// </summary>
  63. public string[] custom_field_list { get; set; }
  64. /// <summary>
  65. /// 自定义富文本类型
  66. /// </summary>
  67. public List<RichField> rich_field_list { get; set; }
  68. }
  69. /// <summary>
  70. /// 自定义富文本类型,包含以下三个字段
  71. /// 富文本类型
  72. /// FORM_FIELD_RADIO 自定义单选
  73. /// FORM_FIELD_SELECT 自定义选择项
  74. /// FORM_FIELD_CHECK_BOX 自定义多选
  75. /// </summary>
  76. public class RichField
  77. {
  78. public RichFieldType type { get; set; }
  79. /// <summary>
  80. /// 否 string(32) 职业 字段名
  81. /// </summary>
  82. public string name { get; set; }
  83. /// <summary>
  84. /// 否 arry 见上述示例 选择项
  85. /// </summary>
  86. public string[] values { get; set; }
  87. }
  88. /// <summary>
  89. /// 富文本类型
  90. /// </summary>
  91. public enum RichFieldType
  92. {
  93. /// <summary>
  94. /// 自定义单选
  95. /// </summary>
  96. FORM_FIELD_RADIO = 0,
  97. /// <summary>
  98. /// 自定义选择项
  99. /// </summary>
  100. FORM_FIELD_SELECT = 1,
  101. /// <summary>
  102. /// 自定义多选
  103. /// </summary>
  104. FORM_FIELD_CHECK_BOX
  105. }
  106. }