
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_shop_idx", def = "{'dateType':1, 'shopId':1}")
})
@Document("flow_spu")
public class FlowSpuBO extends BaseModel implements Serializable{

    public static final Integer ID_LENGTH = 19;


    /**
     * id: 日期（yyMMdd） + 递增id
     * 长度：19位
     */
    @Id
    private Long id;


    /**
     * 日期类型：日、周、月
     */
    private Integer dateType;

    /**
     * 商品id
     */
    private Long spuId;

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

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

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

    /**
     * 曝光次数-浏览量
     */
    private Long visit;

    /**
     * 曝光人数-浏览人数
     */
    private Integer visitUser;


    /**
     * 加购件数
     */
    private Integer plusShopCart;


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

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

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

    /**
     * 下单件数
     */
    private Integer placeOrderNum;

    /**
     * 支付件数
     */
    private Integer payNum;

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

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

    /**
     * 申请退款订单数
     */
    private Integer applyRefundOrder;

    /**
     * 申请退款人数
     */
    private Integer applyRefundUser;

    /**
     * 申请退款金额
     */
    private Long applyRefundAmount;

    /**
     * 成功退款订单数
     */
    private Integer successRefundOrder;

    /**
     * 成功退款人数
     */
    private Integer successRefundUser;

    /**
     * 成功退款金额
     */
    private Long successRefundAmount;

    /**
     * 成功退款率
     */
    private Double refundRate;

    public Long getId() {
        return id;
    }

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

    public Integer getDateType() {
        return dateType;
    }

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

    public Long getSpuId() {
        return spuId;
    }

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

    public Long getVisit() {
        return visit;
    }

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

    public Integer getVisitUser() {
        return visitUser;
    }

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

    public Integer getPlusShopCart() {
        return plusShopCart;
    }

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

    public Integer getPlusShopCartUser() {
        return plusShopCartUser;
    }

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

    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 getPlaceOrderNum() {
        return placeOrderNum;
    }

    public void setPlaceOrderNum(Integer placeOrderNum) {
        this.placeOrderNum = placeOrderNum;
    }

    public Integer getPayNum() {
        return payNum;
    }

    public void setPayNum(Integer payNum) {
        this.payNum = payNum;
    }

    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;
    }

    public Integer getApplyRefundOrder() {
        return applyRefundOrder;
    }

    public void setApplyRefundOrder(Integer applyRefundOrder) {
        this.applyRefundOrder = applyRefundOrder;
    }

    public Integer getApplyRefundUser() {
        return applyRefundUser;
    }

    public void setApplyRefundUser(Integer applyRefundUser) {
        this.applyRefundUser = applyRefundUser;
    }

    public Integer getSuccessRefundOrder() {
        return successRefundOrder;
    }

    public void setSuccessRefundOrder(Integer successRefundOrder) {
        this.successRefundOrder = successRefundOrder;
    }

    public Integer getSuccessRefundUser() {
        return successRefundUser;
    }

    public void setSuccessRefundUser(Integer successRefundUser) {
        this.successRefundUser = successRefundUser;
    }

    public Long getApplyRefundAmount() {
        return applyRefundAmount;
    }

    public void setApplyRefundAmount(Long applyRefundAmount) {
        this.applyRefundAmount = applyRefundAmount;
    }

    public Long getSuccessRefundAmount() {
        return successRefundAmount;
    }

    public void setSuccessRefundAmount(Long successRefundAmount) {
        this.successRefundAmount = successRefundAmount;
    }

    public Long getShopId() {
        return shopId;
    }

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

    public Double getRefundRate() {
        return refundRate;
    }

    public void setRefundRate(Double refundRate) {
        this.refundRate = refundRate;
    }

    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;
    }

    @Override
    public String toString() {
        return "FlowSpuBO{" +
                "id=" + id +
                ", dateType=" + dateType +
                ", spuId=" + spuId +
                ", shopId=" + shopId +
                ", supplierSpuId=" + supplierSpuId +
                ", supplierId=" + supplierId +
                ", visit=" + visit +
                ", visitUser=" + visitUser +
                ", plusShopCart=" + plusShopCart +
                ", plusShopCartUser=" + plusShopCartUser +
                ", placeOrderUser=" + placeOrderUser +
                ", payUser=" + payUser +
                ", placeOrderNum=" + placeOrderNum +
                ", payNum=" + payNum +
                ", placeOrderAmount=" + placeOrderAmount +
                ", payAmount=" + payAmount +
                ", applyRefundOrder=" + applyRefundOrder +
                ", applyRefundUser=" + applyRefundUser +
                ", applyRefundAmount=" + applyRefundAmount +
                ", successRefundOrder=" + successRefundOrder +
                ", successRefundUser=" + successRefundUser +
                ", successRefundAmount=" + successRefundAmount +
                ", refundRate=" + refundRate +
                '}';
    }
}
