ProductResult.cs 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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. 文件名:ProductResult.cs
  17. 文件功能描述:商品结果
  18. 创建标识:Senparc - 20150827
  19. 修改标识:Senparc - 20160610
  20. 修改描述:修改PropertyValue的id类型为int
  21. 修改标识:Senparc - 20160825
  22. 修改描述;将Sku和Value中的id的int类型改为string类型
  23. ----------------------------------------------------------------*/
  24. using System.Collections.Generic;
  25. using Senparc.Weixin.Entities;
  26. namespace Senparc.Weixin.MP.AdvancedAPIs.MerChant
  27. {
  28. /// <summary>
  29. /// 增加商品返回结果
  30. /// </summary>
  31. public class AddProductResult : WxJsonResult
  32. {
  33. public string product_id { get; set; }
  34. }
  35. /// <summary>
  36. /// 查询商品返回结果
  37. /// </summary>
  38. public class GetProductResult : WxJsonResult
  39. {
  40. //商品详细信息
  41. public ProductInfoData product_info { get; set; }
  42. }
  43. /// <summary>
  44. /// 修改商品信息
  45. /// </summary>
  46. public class ProductInfoData : BaseProductData
  47. {
  48. public string product_id { get; set; }
  49. }
  50. /// <summary>
  51. /// 获取指定状态的所有商品返回结果
  52. /// </summary>
  53. public class GetByStatusResult : WxJsonResult
  54. {
  55. public List<GetByStatusProductInfo> products_info { get; set; }
  56. }
  57. public class GetByStatusProductInfo : BaseProductData
  58. {
  59. public string product_id { get; set; }
  60. public int status { get; set; }
  61. }
  62. /// <summary>
  63. /// 获取指定分类的所有子分类返回结果
  64. /// </summary>
  65. public class GetSubResult : WxJsonResult
  66. {
  67. public List<CateItem> cate_list { get; set; }
  68. }
  69. public class CateItem
  70. {
  71. /// <summary>
  72. /// 子分类ID
  73. /// </summary>
  74. public int id { get; set; }
  75. /// <summary>
  76. /// 子分类名称
  77. /// </summary>
  78. public string name { get; set; }
  79. }
  80. /// <summary>
  81. /// 获取指定子分类的所有SKU返回结果
  82. /// </summary>
  83. public class GetSkuResult : WxJsonResult
  84. {
  85. public List<Sku> sku_table { get; set; }
  86. }
  87. public class Sku
  88. {
  89. /// <summary>
  90. /// sku id 将int类型修改为string类型
  91. /// </summary>
  92. public string id { get; set; }
  93. /// <summary>
  94. /// sku 名称
  95. /// </summary>
  96. public string name { get; set; }
  97. /// <summary>
  98. /// sku vid列表
  99. /// </summary>
  100. public List<Value> value_list { get; set; }
  101. }
  102. public class Value
  103. {
  104. /// <summary>
  105. /// vid
  106. /// 将id的int类型改为string类型
  107. /// </summary>
  108. public string id { get; set; }
  109. /// <summary>
  110. /// vid名称
  111. /// </summary>
  112. public string name { get; set; }
  113. }
  114. /// <summary>
  115. /// 获取指定分类的所有属性返回结果
  116. /// </summary>
  117. public class GetPropertyResult : WxJsonResult
  118. {
  119. public List<PropertyItem> properties { get; set; }
  120. }
  121. public class PropertyItem
  122. {
  123. /// <summary>
  124. /// 属性id
  125. /// </summary>
  126. public string id { get; set; }
  127. /// <summary>
  128. /// 属性名称
  129. /// </summary>
  130. public string name { get; set; }
  131. /// <summary>
  132. /// 属性值
  133. /// </summary>
  134. public List<PropertyValue> property_value { get; set; }
  135. }
  136. public class PropertyValue
  137. {
  138. /// <summary>
  139. /// 属性值id
  140. /// </summary>
  141. public string id { get; set; }
  142. /// <summary>
  143. /// 属性值名称
  144. /// </summary>
  145. public string name { get; set; }
  146. }
  147. }