
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 = "retain_type_idx", def = "{'retainType':1}")
})
@Document("flow_user_retain")
public class FlowUserRetainBO extends BaseModel implements Serializable{

    public static final Integer ID_LENGTH = 5;

    /**
     * id: 日期（yyMM） + retainType
     * 长度：5位
     */
    @Id
    private Integer id;

    /**
     * 留存类型 1: 访问留存  2：成交留存
     */
    private Integer retainType;

    /**
     * 新访问/成交客户数
     */
    private Integer newCustomers;

    /**
     * 第1月留存
     */
    private Integer firstMonthRemain;


    /**
     * 第2月留存
     */
    private Integer secondMonthRemain;

    /**
     * 第3月留存
     */
    private Integer thirdMonthRemain;

    /**
     * 第4月留存
     */
    private Integer fourthMonthRemain;


    /**
     * 第5月留存
     */
    private Integer fifthMonthRemain;

    /**
     * 第6月留存
     */
    private Integer sixthMonthRemain;


    public FlowUserRetainBO() {
        this.newCustomers = 0;
        this.firstMonthRemain = 0;
        this.secondMonthRemain = 0;
        this.thirdMonthRemain = 0;
        this.fourthMonthRemain = 0;
        this.fifthMonthRemain = 0;
        this.sixthMonthRemain = 0;
    }

    public Integer getId() {
        return id;
    }

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

    public Integer getNewCustomers() {
        return newCustomers;
    }

    public void setNewCustomers(Integer newCustomers) {
        this.newCustomers = newCustomers;
    }

    public Integer getFirstMonthRemain() {
        return firstMonthRemain;
    }

    public void setFirstMonthRemain(Integer firstMonthRemain) {
        this.firstMonthRemain = firstMonthRemain;
    }

    public Integer getSecondMonthRemain() {
        return secondMonthRemain;
    }

    public void setSecondMonthRemain(Integer secondMonthRemain) {
        this.secondMonthRemain = secondMonthRemain;
    }

    public Integer getThirdMonthRemain() {
        return thirdMonthRemain;
    }

    public void setThirdMonthRemain(Integer thirdMonthRemain) {
        this.thirdMonthRemain = thirdMonthRemain;
    }

    public Integer getFourthMonthRemain() {
        return fourthMonthRemain;
    }

    public void setFourthMonthRemain(Integer fourthMonthRemain) {
        this.fourthMonthRemain = fourthMonthRemain;
    }

    public Integer getFifthMonthRemain() {
        return fifthMonthRemain;
    }

    public void setFifthMonthRemain(Integer fifthMonthRemain) {
        this.fifthMonthRemain = fifthMonthRemain;
    }

    public Integer getSixthMonthRemain() {
        return sixthMonthRemain;
    }

    public void setSixthMonthRemain(Integer sixthMonthRemain) {
        this.sixthMonthRemain = sixthMonthRemain;
    }

    public Integer getRetainType() {
        return retainType;
    }

    public void setRetainType(Integer retainType) {
        this.retainType = retainType;
    }

    @Override
    public String toString() {
        return "FlowUserRetainBO{" +
                "id=" + id +
                ", retainType=" + retainType +
                ", newCustomers=" + newCustomers +
                ", firstMonthRemain=" + firstMonthRemain +
                ", secondMonthRemain=" + secondMonthRemain +
                ", thirdMonthRemain=" + thirdMonthRemain +
                ", fourthMonthRemain=" + fourthMonthRemain +
                ", fifthMonthRemain=" + fifthMonthRemain +
                ", sixthMonthRemain=" + sixthMonthRemain +
                '}';
    }
}
