
package com.tmerclub.cloud.flow.bo;

import com.tmerclub.cloud.common.model.BaseModel;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;


/**
 * 区域统计
 *
 * @author YXF
 * @date 2020-07-13 13:18:33
 */
@CompoundIndexes({
        @CompoundIndex(name = "data_type_province_idx", def = "{'dateType':1, 'provinceId':1}")
})
@Document("flow_regional")
public class FlowRegionalBO extends BaseModel implements Serializable {

    public static final Integer ID_LENGTH = 9;

    /**
     * id: 日期（yyMMdd）+ 时间类型 + 省id
     * 长度：8位
     */
    @Id
    private Integer id;

    /**
     * 日、周、月
     */
    private Integer dateType;

    /**
     * 省id
     */
    private Integer provinceId;

    /**
     * 浏览量
     */
    private Integer visitNum;

    /**
     * 访客数
     */
    private Integer visitUserNum;

    /**
     * 商品浏览量
     */
    private Integer spuVisitNum;

    /**
     * 商品访客数
     */
    private Integer spuVisitUserNum;

    /**
     * 加购用户数量
     */
    private Integer plusShopCartUserNum;

    /**
     * 加购数量
     */
    private Long plusShopCartNum;

    /**
     * 下单用户数
     */
    private Integer placeOrderUserNum;

    /**
     * 支付用户数
     */
    private Integer payUserNum;

    /**
     * 下单金额
     */
    private Long placeOrderAmount;

    /**
     * 支付金额
     */
    private Long payAmount;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getDateType() {
        return dateType;
    }

    public void setDateType(Integer dateType) {
        this.dateType = dateType;
    }

    public Integer getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(Integer provinceId) {
        this.provinceId = provinceId;
    }

    public Integer getVisitNum() {
        return visitNum;
    }

    public void setVisitNum(Integer visitNum) {
        this.visitNum = visitNum;
    }

    public Integer getVisitUserNum() {
        return visitUserNum;
    }

    public void setVisitUserNum(Integer visitUserNum) {
        this.visitUserNum = visitUserNum;
    }

    public Integer getSpuVisitNum() {
        return spuVisitNum;
    }

    public void setSpuVisitNum(Integer spuVisitNum) {
        this.spuVisitNum = spuVisitNum;
    }

    public Integer getSpuVisitUserNum() {
        return spuVisitUserNum;
    }

    public void setSpuVisitUserNum(Integer spuVisitUserNum) {
        this.spuVisitUserNum = spuVisitUserNum;
    }

    public Integer getPlusShopCartUserNum() {
        return plusShopCartUserNum;
    }

    public void setPlusShopCartUserNum(Integer plusShopCartUserNum) {
        this.plusShopCartUserNum = plusShopCartUserNum;
    }

    public Long getPlusShopCartNum() {
        return plusShopCartNum;
    }

    public void setPlusShopCartNum(Long plusShopCartNum) {
        this.plusShopCartNum = plusShopCartNum;
    }

    public Integer getPlaceOrderUserNum() {
        return placeOrderUserNum;
    }

    public void setPlaceOrderUserNum(Integer placeOrderUserNum) {
        this.placeOrderUserNum = placeOrderUserNum;
    }

    public Integer getPayUserNum() {
        return payUserNum;
    }

    public void setPayUserNum(Integer payUserNum) {
        this.payUserNum = payUserNum;
    }

    public Long getPlaceOrderAmount() {
        return placeOrderAmount;
    }

    public void setPlaceOrderAmount(Long placeOrderAmount) {
        this.placeOrderAmount = placeOrderAmount;
    }

    public Long getPayAmount() {
        return payAmount;
    }

    public void setPayAmount(Long payAmount) {
        this.payAmount = payAmount;
    }

    @Override
    public String toString() {
        return "FlowRegionalBO{" +
                "id=" + id +
                ", dateType=" + dateType +
                ", provinceId=" + provinceId +
                ", visitNum=" + visitNum +
                ", visitUserNum=" + visitUserNum +
                ", spuVisitNum=" + spuVisitNum +
                ", spuVisitUserNum=" + spuVisitUserNum +
                ", plusShopCartUserNum=" + plusShopCartUserNum +
                ", plusShopCartNum=" + plusShopCartNum +
                ", placeOrderUserNum=" + placeOrderUserNum +
                ", payUserNum=" + payUserNum +
                ", placeOrderAmount=" + placeOrderAmount +
                ", payAmount=" + payAmount +
                '}';
    }
}
