package com.cyksj.model.views;

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

import java.math.BigDecimal;
import java.util.Date;

/**
 * 项目名: yhlxj
 * 文件名: UserDistributeTargetAlertView
 * 创建者: JavaZou
 * 创建时间:2023/11/22 16:35
 */
@Getter
@Setter
@SearchBean(tables = "user_distribute_target_alert_record ur inner join user_distribute ud on ud.id = ur.distribute_id and ud.deleted is true" +
		" inner join user u on u.id = ud.user_id" +
		" left join cms_user cu on cu.id = ud.business_id")
public class UserDistributeTargetAlertView {

	@DbField("ur.id")
	private Long id;

	/**
	 * 用户id
	 */
	@DbField("u.id")
	private Long userId;

	/**
	 * 用户昵称
	 */
	@DbField("u.nickname")
	private String nickname;

	@DbField("ur.distribute_id")
	private Long distributeId;

	@DbField("ud.business_id")
	private Long businessId;

	/**
	 * 目标类型
	 */
	@DbField("ur.type")
	private Integer type;

	/**
	 * 目标值
	 */
	@DbField("ur.target")
	private BigDecimal target;

	@DbField("ur.trigger_target")
	private BigDecimal triggerTarget;

	/**
	 * 是否跟进
	 */
	@DbField("ur.status")
	private Boolean status;

	/**
	 * 商务名
	 */
	@DbField("cu.nickname")
	private String businessName;

	/**
	 * 备注
	 */
	@DbField("ud.remark")
	private String remark;

	/**
	 * 触发时间
	 */
	@DbField("ur.created_time")
	private Date createdTime;
}
