package com.slodon.b2b2c.vo.statistics;

import com.slodon.b2b2c.core.util.TimeUtil;
import com.slodon.b2b2c.statistics.pojo.StoreDay;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 *
 * 封装商品动销-商品报表(按天)Vo对象
 * @author wuxy
 */
@Data
public class GoodsReportDayVO {

    @ApiModelProperty("统计时间，数据统计的开始时间")
    private String statsTime;

    @ApiModelProperty("支付金额")
    private BigDecimal orderPayAmount;

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

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

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

    @ApiModelProperty("新增商品数")
    private Integer newGoodsNum;

    @ApiModelProperty("动销商品数")
    private Integer movableGoodsNum;

    public GoodsReportDayVO(StoreDay storeDay) {
        this.statsTime = TimeUtil.getZDDay(storeDay.getStatsTime());
        this.orderPayAmount = storeDay.getOrderPayAmount();
        this.orderSubmitAmount = storeDay.getOrderSubmitAmount();
        this.orderPayNum = storeDay.getOrderPayNum();
        this.orderSubmitNum = storeDay.getOrderSubmitNum();
        this.newGoodsNum = storeDay.getNewGoodsNum();
        this.movableGoodsNum = storeDay.getSalingGoodsNum();
    }
}
