package com.ruoyi.project.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 【请填写功能名称】对象 tc_lead_history
 * 
 * @author ruoyi
 * @date 2024-04-23
 */

@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("tc_lead_history")
@Accessors(chain = true)
public class TcLeadHistory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 线索ID */
    @Excel(name = "线索ID")
    private Long leadId;

    /** 操作人 */
    @Excel(name = "操作人")
    private Long oriUser;

    /** 0:新增；1分配；2回收 3转化客户4 转化项目 */
    @Excel(name = "0:新增；1分配；2回收 3转化客户4 转化项目")
    private Long actionType;

    /** 回收分类 */
    @Excel(name = "回收分类")
    private String recoveryType;

    /** 回收原因 */
    @Excel(name = "回收原因")
    private String recoveryReason;

    /** 对象(分配用户id/转化客户Id，转化项目Id) */
    @Excel(name = "对象(分配用户id/转化客户Id，转化项目Id)")
    private Long getUser;

    /** 删除标记（0：启用  1：停用） */
    private String delFlag;
    
    @TableField(exist = false)
    private String hisContent;
    
    /** 操作人 */
    @TableField(exist = false)
    private String oriUserName;

    
    public TcLeadHistory(Long leadId, Long oriUser, Long actionType, String recoveryType, String recoveryReason, Long getUser, Long createBy, Date createTime, String remark) {
        this.leadId = leadId;
        this.oriUser = oriUser;
        this.actionType = actionType;
        this.recoveryType = recoveryType;
        this.recoveryReason = recoveryReason;
        this.getUser = getUser;
        super.setRemark(remark);
        super.setCreateBy(String.valueOf(createBy));
        super.setCreateTime(createTime);
    }
}
