package com.slodon.b2b2c.vo.statistics;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 *
 * 封装商品动销-商品销售变化趋势对象
 * @author wuxy
 */
@Data
public class GoodsChangeTrendVO implements Comparable<GoodsChangeTrendVO> {

    @ApiModelProperty("统计时间")
    private String statsTime;

    @ApiModelProperty("商品列表")
    private List<GoodsTrendVO> goodsList = new ArrayList<>();

    @Override
    public int compareTo(GoodsChangeTrendVO o) {
        return this.statsTime.compareTo(o.getStatsTime());
    }

    @Data
    public static class GoodsTrendVO {
        @ApiModelProperty("商品id")
        private Long goodsId;

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

        @ApiModelProperty("销售额")
        private BigDecimal saleAmount;

        @ApiModelProperty("销量")
        private Integer saleNum;
    }

}
