package com.slodon.b2b2c.vo.statistics;

import com.slodon.b2b2c.statistics.pojo.base.CategoryBase;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 *
 * 封装商品品类-品类销售报表Vo对象
 * @author wuxy
 */
@Data
public class CategoryReportVO {

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

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

    @ApiModelProperty("下单数")
    private Integer orderSubmitNum;

    @ApiModelProperty("下单金额")
    private BigDecimal orderSubmitAmount;

    @ApiModelProperty("支付订单数")
    private Integer orderPayNum;

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

    @ApiModelProperty("销售额占比")
    private String saleAmountPercent;

    @ApiModelProperty("销冠商品")
    private String goodsName;

    @ApiModelProperty("退单数")
    private Integer returnNum;

    @ApiModelProperty("退单金额")
    private BigDecimal returnAmount;

    public CategoryReportVO(CategoryBase categoryBase) {
        this.categoryId = categoryBase.getCategoryId();
        this.categoryName = categoryBase.getCategoryName();
        this.orderSubmitNum = categoryBase.getOrderSubmitNum();
        this.orderSubmitAmount = categoryBase.getOrderSubmitAmount();
        this.orderPayNum = categoryBase.getOrderPayNum();
        this.saleAmount = categoryBase.getSaleAmount();
        this.returnNum = categoryBase.getReturnNum();
        this.returnAmount = categoryBase.getReturnAmount();
    }
}
