package com.xinelu.manage.domain.batchsendtaskrecordinfo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xinelu.common.annotation.Excel;
import com.xinelu.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.time.LocalDateTime;

/**
 * 批量推送任务记录对象 batch_send_task_record_info
 *
 * @author zh
 * @date 2026-04-26
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "批量推送任务记录对象", description = "batch_send_task_record_info")
public class BatchSendTaskRecordInfo extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 批量发送任务id
     */
    private Long id;

    /**
     * 批量发送任务编号
     */
    @ApiModelProperty(value = "批量发送任务编号")
    @Excel(name = "批量发送任务编号")
    private String batchTaskNumber;

    /**
     * 批量发送任务名称
     */
    @ApiModelProperty(value = "批量发送任务名称")
    @Excel(name = "批量发送任务名称")
    private String batchTaskName;

    /**
     * 批量任务：BATCH_TASK,单个实时拔打任务：ACTUAL_TIME_TASK
     */
    @ApiModelProperty(value = "批量任务：BATCH_TASK,单个实时拔打任务：ACTUAL_TIME_TASK")
    private String taskExecuteType;

    /**
     * 任务计划执行时间
     */
    @ApiModelProperty(value = "任务计划执行时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "任务计划执行时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime nodePlanTime;

    /**
     * 模版类型，短信：message；电话：telephone
     */
    @ApiModelProperty(value = "模版类型，短信：message；电话：telephone")
    @Excel(name = "模版类型，短信：message；电话：telephone")
    private String batchTaskSource;

    /**
     * 第三方平台模板ID
     */
    @ApiModelProperty(value = "第三方平台模板ID")
    private String robotPublishId;

    /**
     * 模板表id
     */
    @ApiModelProperty(value = "模板表id")
    private String templateId;

    /**
     * 电话模板名称
     */
    @ApiModelProperty(value = "电话模板名称")
    @Excel(name = "模板名称")
    private String templateName;

    /**
     * 内容（变量使用特殊符号进行标记）
     */
    @ApiModelProperty(value = "内容")
    @Excel(name = "内容", readConverterExp = "变量使用特殊符号进行标记")
    private String nodeContent;

    /**
     * 节点任务执行状态，已执行：EXECUTED，未执行：UNEXECUTED，执行中：EXECUTING
     */
    @ApiModelProperty(value = "节点任务执行状态，已执行：EXECUTED，未执行：UNEXECUTED，执行中：EXECUTING")
    @Excel(name = "节点任务执行状态，已执行：EXECUTED，未执行：UNEXECUTED，执行中：EXECUTING")
    private String nodeExecuteStatus;

    /**
     * 总结标签，逗号隔断
     */
    @ApiModelProperty(value = "总结标签，逗号隔断")
    @Excel(name = "总结标签")
    private String physicalExaminationLabel;

    /**
     * 删除标识，0：未删除，1：已删除
     */
    private Integer delFlag;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("batchTaskNumber", getBatchTaskNumber())
                .append("batchTaskName", getBatchTaskName())
                .append("taskExecuteType", getTaskExecuteType())
                .append("nodePlanTime", getNodePlanTime())
                .append("batchTaskSource", getBatchTaskSource())
                .append("robotPublishId", getRobotPublishId())
                .append("templateId", getTemplateId())
                .append("templateName", getTemplateName())
                .append("nodeContent", getNodeContent())
                .append("nodeExecuteStatus", getNodeExecuteStatus())
                .append("physicalExaminationLabel", getPhysicalExaminationLabel())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .toString();
    }
}