package com.cyksj.model.views;

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

import java.util.Date;

/*
 *项目名: netflix
 *文件名: CorpMsgBulkTaskSendRecordView
 *创建者: JavaZou
 *创建时间:2023/6/21 11:42
 */
@Getter
@Setter
@SearchBean(tables = "(select * from corp_msg_bulk_task_record where :task_id: :time:) cmr left join corp_user_send_record cr on cr.corp_msg_record_id = cmr.id",
		groupBy = "cmr.send_id")
public class CorpMsgBulkTaskSendRecordView {

	@DbField("cmr.send_id")
	private Long senId;

	/**
	 * 总数
	 */
	@DbIgnore
	private Integer total;

	/**
	 * 送达
	 */
	@DbField("count(if(cr.status = 1,cr.id,null))")
	private Integer send;

	/**
	 * 未送达
	 */
	@DbIgnore
	private Integer notSend;

	@DbField("any_value(cmr.created_time)")
	private Date createTime;

}
