
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 = "date_type_system_type_idx", def = "{'dateType':1, 'systemType':1}"),
        @CompoundIndex(name = "spu_user_idx", def = "{'spuId':1, 'userId':1}")
})
@Document("flow_system")
public class FlowSystemBO extends BaseModel implements Serializable{

    public static final Integer ID_LENGTH = 8;

    /**
     * id: 日期（yyMMdd）+ 日期类型（日周月） + 系统类型
     * 长度：8位
     */
    @Id
    private Integer id;

    /**
     * 系统类型 0:全部 1:pc  2:h5  3:小程序 4:安卓  5:ios
     */
    private Integer systemType;

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

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

    /**
     * 加购人数
     */
    private Integer plusShopCartUser;

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

    /**
     * 新访客数
     */
    private Integer newVisitUser;

    /**
     * 跳失人数
     */
    private Integer lossUser;

    /**
     * 下单人数
     */
    private Integer placeOrderUser;

    /**
     * 支付人数
     */
    private Integer payUser;

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

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

    public Integer getId() {
        return id;
    }

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

    public Integer getSystemType() {
        return systemType;
    }

    public void setSystemType(Integer systemType) {
        this.systemType = systemType;
    }

    public Integer getDateType() {
        return dateType;
    }

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

    public Integer getVisit() {
        return visit;
    }

    public void setVisit(Integer visit) {
        this.visit = visit;
    }

    public Integer getPlusShopCartUser() {
        return plusShopCartUser;
    }

    public void setPlusShopCartUser(Integer plusShopCartUser) {
        this.plusShopCartUser = plusShopCartUser;
    }

    public Integer getVisitUser() {
        return visitUser;
    }

    public void setVisitUser(Integer visitUser) {
        this.visitUser = visitUser;
    }

    public Integer getNewVisitUser() {
        return newVisitUser;
    }

    public void setNewVisitUser(Integer newVisitUser) {
        this.newVisitUser = newVisitUser;
    }

    public Integer getLossUser() {
        return lossUser;
    }

    public void setLossUser(Integer lossUser) {
        this.lossUser = lossUser;
    }

    public Integer getPlaceOrderUser() {
        return placeOrderUser;
    }

    public void setPlaceOrderUser(Integer placeOrderUser) {
        this.placeOrderUser = placeOrderUser;
    }

    public Integer getPayUser() {
        return payUser;
    }

    public void setPayUser(Integer payUser) {
        this.payUser = payUser;
    }

    public Integer getPlaceOrderAmount() {
        return placeOrderAmount;
    }

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

    public Integer getPayAmount() {
        return payAmount;
    }

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

    @Override
    public String toString() {
        return "FlowSystemBO{" +
                "id=" + id +
                ", systemType=" + systemType +
                ", dateType=" + dateType +
                ", visit=" + visit +
                ", plusShopCartUser=" + plusShopCartUser +
                ", visitUser=" + visitUser +
                ", newVisitUser=" + newVisitUser +
                ", lossUser=" + lossUser +
                ", placeOrderUser=" + placeOrderUser +
                ", payUser=" + payUser +
                ", placeOrderAmount=" + placeOrderAmount +
                ", payAmount=" + payAmount +
                '}';
    }
}
