
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 = "spu_user_idx", def = "{'spuId':1, 'userId':1}")
})
@Document("flow_spu_user")
public class FlowSpuUserBO extends BaseModel implements Serializable{



    /**
     * id: 日期（yyMMdd）+ 编号
     * 长度：18位
     */
    @Id
    private Long id;
    /**
     * 用户id
     */
    private Long userId;
    /**
     * 商品id
     */
    private Long spuId;

    /**
     * 店铺id
     */
    private Long shopId;

    /**
     * 供应商商品id
     */
    private Long supplierSpuId;

    /**
     * 供应商商品id
     */
    private Long supplierId;

    /**
     * 省id
     */
    private Long provinceId;

    /**
     * 是否浏览 1：是  0
     */
    private Integer visit;

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

    /**
     * 是否加购 1：加购  0：未加购
     */
    private Integer plusShopCart;

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

    /**
     * 是否为新访客数 1：新访客(新用户+新访客)  0：旧访客（旧用户）
     */
    private Integer newVisit;

    /**
     * operateId
     */
    private Long oid;

    public Long getId() {
        return id;
    }

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

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getSpuId() {
        return spuId;
    }

    public void setSpuId(Long spuId) {
        this.spuId = spuId;
    }

    public Long getProvinceId() {
        return provinceId;
    }

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

    public Integer getVisit() {
        return visit;
    }

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

    public Integer getPlusShopCart() {
        return plusShopCart;
    }

    public void setPlusShopCart(Integer plusShopCart) {
        this.plusShopCart = plusShopCart;
    }

    public Integer getPlusShopCartNum() {
        return plusShopCartNum;
    }

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

    public Integer getVisitNum() {
        return visitNum;
    }

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

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Long getSupplierSpuId() {
        return supplierSpuId;
    }

    public void setSupplierSpuId(Long supplierSpuId) {
        this.supplierSpuId = supplierSpuId;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public Long getOid() {
        return oid;
    }

    public void setOid(Long oid) {
        this.oid = oid;
    }

    public Integer getNewVisit() {
        return newVisit;
    }

    public void setNewVisit(Integer newVisit) {
        this.newVisit = newVisit;
    }

    @Override
    public String toString() {
        return "FlowSpuUserBO{" +
                "id=" + id +
                ", userId=" + userId +
                ", spuId=" + spuId +
                ", shopId=" + shopId +
                ", supplierSpuId=" + supplierSpuId +
                ", supplierId=" + supplierId +
                ", provinceId=" + provinceId +
                ", visit=" + visit +
                ", visitNum=" + visitNum +
                ", plusShopCart=" + plusShopCart +
                ", plusShopCartNum=" + plusShopCartNum +
                ", newVisit=" + newVisit +
                ", oid=" + oid +
                '}';
    }
}
