package com.slodon.b2b2c.vo.statistics;

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

import java.math.BigDecimal;

/**
 *
 * 封装流量分析-流量报表Vo对象
 * @author wuxy
 */
@Data
public class SellerFlowReportVO {

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

    @ApiModelProperty("店铺访客数")
    private Integer visitorNum;

    @ApiModelProperty("店铺浏览量")
    private Integer viewNum;

    @ApiModelProperty("人均浏览量")
    private BigDecimal perViewNum;

    @ApiModelProperty("商品访客数")
    private Integer goodsVisitorNum;

    @ApiModelProperty("商品浏览量")
    private Integer goodsViewNum;

    public SellerFlowReportVO(StoreBase storeBase) {
        this.statsTime = TimeUtil.getZDDay(storeBase.getStatsTime());
        this.visitorNum = storeBase.getVisitorNum();
        this.viewNum = storeBase.getViewNum();
        this.perViewNum = storeBase.getPerViewNum();
        this.goodsVisitorNum = storeBase.getGoodsVisitorNum();
        this.goodsViewNum = storeBase.getGoodsViewNum();
    }
}
