package com.cyksj.model.views;

import com.ejlchina.searcher.bean.DbField;
import com.ejlchina.searcher.bean.SearchBean;
import lombok.Getter;
import lombok.Setter;

/**
 * 项目名: yhlxj
 * 文件名: RenewFollowStatisticsView
 * 创建者: JavaZou
 * 创建时间:2023/11/17 16:14
 */
@Getter
@Setter
@SearchBean(tables = "groups_relation_expiry_record",
		where = ":time:",
		groupBy = "customer_service_id")
public class RenewFollowStatisticsView {
	@DbField("any_value(customer_service)")
	private String customerService;

	@DbField("count(*)")
	private Integer assignUsers;

	@DbField("count(if(is_follow = 1,1,NULL))")
	private Integer followUsers;

	/**
	 * 跟进且续费的人数
	 */
	@DbField("count(if(is_re_buy = 1 and is_follow = 1,1,NULL))")
	private Integer reBuyUsers;
}
