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;

/**
 *
 * 封装商品品类-TOP10品类销售趋势VO对象
 * @author wuxy
 */
@Data
public class CategoryChangeTrendVO implements Comparable<CategoryChangeTrendVO> {

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

    @ApiModelProperty("品类列表")
    private List<CategoryTrendVO> CategoryList = new ArrayList<>();

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

    @Data
    public static class CategoryTrendVO {

        @ApiModelProperty("商品分类id")
        private Integer categoryId;

        @ApiModelProperty("商品分类名称")
        private String categoryName;

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

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

}
