package com.yami.shop.bean.vo;

import com.alibaba.fastjson.JSONArray;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author wy
 */
@Data
public class GoodsItemVo {

    @ApiModelProperty("商品条码")
    private String brandCode;

    @ApiModelProperty("品牌名称")
    private String brandName;

    @ApiModelProperty("图片")
    private String productImage;

    @ApiModelProperty("描述")
    private String description;

    private Integer specType;

    private Integer valid;

    private String spuId;

    private Integer isStandard;

    private BigDecimal origin1;

    private List<ItemProperties> itemProperties;

    private List<CategoryInfo> categoryInfo;

    private JSONArray labels;

    private String skuInfo;

    private String coverVideoUrl;

    private String producer;

    private String sellPoint;

    private String videoInfo;

    @ApiModelProperty("图片详情")
    private String images;

    @ApiModelProperty("图片详情")
    private String imagesDetails;

    @ApiModelProperty("创建时间")
    private Long createTime;

    @ApiModelProperty("商品分类")
    private String category;

    @ApiModelProperty("饿了么的外键")
    private String elemChannelForeignKey;

    @ApiModelProperty("京东到家外键")
    private String jddjChannelForeignKey;

    @ApiModelProperty("美团外键")
    private String mtChannelForeignKey;

    @ApiModelProperty("抖音外键")
    private String dyChannelForeignKey;

    @ApiModelProperty("商品名称")
    private String name;

    @ApiModelProperty("门店编码")
    private String poiCode;

    @ApiModelProperty("门店名称")
    private String poiName;

    @ApiModelProperty("商品编码")
    private String spuCode;

    @ApiModelProperty("渠道状态，-1-未上线，1-已上架，2-已下架")
    private ChannelSpuStatus channelSpuStatus;

    @ApiModelProperty("图片详情")
    private List<SukList> skuList;


    @Data
    public static class ChannelSpuStatus {
        @ApiModelProperty("美团渠道状态")
        private Integer mtChannelSpuStatus;

        @ApiModelProperty("饿了么渠道状态")
        private Integer elemChannelSpuStatus;

        @ApiModelProperty("京东到家渠道状态")
        private Integer jddjChannelSpuStatus;

        @ApiModelProperty("抖音渠道状态")
        private Integer dyChannelSpuStatus;
    }

    @Data
    public static class CategoryInfo {

        @ApiModelProperty("分类code")
        private String code;

        @ApiModelProperty("分类名称")
        private String name;

        @ApiModelProperty("分类类型")
        private String type;

    }

    @Data
    public static class ItemProperties {

        @ApiModelProperty("分类code")
        private JSONArray itemPropertyDetail;

        @ApiModelProperty("分类名称")
        private String propertyName;

    }

    @Data
    public static class ChannelItemInfoList {

        @ApiModelProperty("渠道code")
        private String channelCode;

        @ApiModelProperty("渠道id")
        private Integer channelId;

        @ApiModelProperty("渠道名称")
        private String channelName;

        @ApiModelProperty("渠道价格")
        private String channelPrice;

        @ApiModelProperty("渠道库存")
        private BigDecimal channelQuantity;
    }

    @Data
    public static class SukList {

        private List<ChannelItemInfoList> channelItemInfoList;

        @ApiModelProperty("sku饿了么外键")
        private String elemsSkuForeignKey;

        @ApiModelProperty("sku京东到家外键")
        private String jddjSkuForeignKey;

        @ApiModelProperty("sku美团外键")
        private String mtSkuForeignKey;

        @ApiModelProperty("抖音外键")
        private String dySkuForeignKey;

        @ApiModelProperty("sku编码")
        private String skuId;

        @ApiModelProperty("规格")
        private String spec;

        @ApiModelProperty("采购状态1:正常采购，2:停止采购")
        private Integer purchaseStatus;

        @ApiModelProperty("upc集合")
        private JSONArray upc;

        @ApiModelProperty("货品单位")
        private String packingUnit;

        @ApiModelProperty("起购数量")
        private String qgsl;

        @ApiModelProperty("售卖单位")
        private String unit;

        @ApiModelProperty("保质期")
        private String warranty;

        @ApiModelProperty("带单位的重量")
        private String weightForUnit;

        @ApiModelProperty("重量单位")
        private String weightUnit;

    }

}
