#region Apache License Version 2.0 /*---------------------------------------------------------------- Copyright 2019 Jeffrey Su & Suzhou Senparc Network Technology Co.,Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Detail: https://github.com/JeffreySu/WeiXinMPSDK/blob/master/license.md ----------------------------------------------------------------*/ #endregion Apache License Version 2.0 /*---------------------------------------------------------------- Copyright (C) 2019 Senparc 文件名:BaseProductData.cs 修改标识:Senparc - 20160805 修改描述:修改Property中参数的类型,将其int改为string 修改Attrext中参数的类型,将其bool改为int ----------------------------------------------------------------*/ using System.Collections.Generic; namespace Senparc.Weixin.MP.AdvancedAPIs.MerChant { /// /// 商品信息 /// public class BaseProductData { /// /// 基本属性 /// public Product_base product_base { get; set; } /// /// sku信息列表(可为多个),每个sku信息串即为一个确定的商品,比如白色的37码的鞋子 /// public List sku_list { get; set; } /// /// 商品其他属性 /// public Attrext attrext { get; set; } /// /// 运费信息 /// public Delivery_info delivery_info { get; set; } } public class Product_base { /// /// 商品名称 /// public string name { get; set; } /// /// 商品分类id /// public string[] category_id { get; set; } /// /// 商品图片列表 /// public string[] img { get; set; } /// /// 商品详情列表,显示在客户端的商品详情页内 /// public List detail { get; set; } /// /// 商品属性列表 /// public List property { get; set; } /// /// 商品sku定义 /// public List sku_info { get; set; } /// /// 用户商品限购数量 /// public int buy_limit { get; set; } /// /// 商品主图 /// public string main_img { get; set; } /// /// 详情 /// public string detail_html { get; set; } } public class Property { /// /// 属性id 原来是int 改为string /// public string id { get; set; } /// /// 属性值id 原来是int 改为string /// public string vid { get; set; } } public class Sku_info { /// /// sku属性 原来是int 改为string /// public string id { get; set; } /// /// sku值 原来是int 改为string /// public string[] vid { get; set; } } public class Detail { /// /// 文字描述 /// public string text { get; set; } /// /// 图片 /// public string img { get; set; } } public class Sku_list { /// /// sku信息 /// public string sku_id { get; set; } /// /// sku微信价(单位 : 分, 微信价必须比原价小, 否则添加商品失败) /// public int price { get; set; } /// /// sku iconurl(图片需调用图片上传接口获得图片Url) /// public string icon_url { get; set; } /// /// 商家商品编码 /// public string product_code { get; set; } /// /// sku原价(单位 : 分) /// public int ori_price { get; set; } /// /// sku库存 /// public int quantity { get; set; } } public class Attrext { /// /// 商品所在地地址 /// public Location location { get; set; } /// /// 是否包邮(0-否, 1-是), 如果包邮delivery_info字段可省略 /// public int isPostFree { get; set; } /// /// 是否提供发票(0-否, 1-是) /// public int isHasReceipt { get; set; } /// /// 是否保修(0-否, 1-是) /// public int isUnderGuaranty { get; set; } /// /// 是否支持退换货(0-否, 1-是) /// public int isSupportReplace { get; set; } } public class Location { /// /// 国家 /// public string country { get; set; } /// /// 省份 /// public string province { get; set; } /// /// 城市 /// public string city { get; set; } /// /// 地址 /// public string address { get; set; } } /// 快递列表(Id 说明) /// 10000027 平邮 /// 10000028 快递 /// 10000029 EMS public class Delivery_info { /// /// 运费类型(0-使用下面express字段的默认模板, 1-使用template_id代表的邮费模板) /// public int delivery_type { get; set; } /// /// 邮费模板ID /// public int template_id { get; set; } /// /// 快递信息 /// public List express { get; set; } } public class Express { /// /// 快递ID /// public int id { get; set; } /// /// 运费(单位 : 分) /// public int price { get; set; } } /// /// 添加商品信息 /// public class AddProductData : BaseProductData { } /// /// 修改商品信息 /// public class UpdateProductData : BaseProductData { /// /// 商品ID /// public string product_id { get; set; } } }