package com.docus.server.entity.scheduling.management;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import com.docus.server.enums.*;

/**
* <p>
    * 采集记录表
    * </p>
*
* @author AutoGenerator
* @since 2023-07-14
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sch_collect_record")
@ApiModel(value="SchCollectRecord对象", description="采集记录表")
public class SchCollectRecord implements Serializable {

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private Long id;

    @ApiModelProperty(value = "终端主键")
    @TableField("terminator_id")
    private Long terminatorId;

    @ApiModelProperty(value = "采集器类型")
    @TableField("collector_type")
    private String collectorType;

    @ApiModelProperty(value = "任务id")
    @TableField("task_id")
    private Long taskId;

    @ApiModelProperty(value = "任务名称")
    @TableField("task_name")
    private String taskName;

    @ApiModelProperty(value = "任务描述")
    @TableField("task_memo")
    private String taskMemo;

    @ApiModelProperty(value = "任务起始时间范围")
    @TableField("start_time")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "任务结束时间范围")
    @TableField("end_time")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "任务耗时时间,单位：毫秒")
    @TableField("elapsed_time")
    private Long elapsedTime;

    @ApiModelProperty(value = "任务详细信息")
    @TableField("task_detail_info")
    private String taskDetailInfo;

    @ApiModelProperty(value = "任务执行状态，0：成功，1：失败")
    @TableField("task_exec_state")
    private String taskExecState;

    @ApiModelProperty(value = "子任务执行状态：0：接收，1：启动，2：异常，3：推迟，4：完成，5：作废")
    @TableField("sub_task_exec_state")
    private String subTaskExecState;

    @ApiModelProperty(value = "最近一次任务执行失败原因")
    @TableField("last_task_error_msg")
    private String lastTaskErrorMsg;

    @ApiModelProperty(value = "入库时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "入库更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "redis队列任务原始报文")
    @TableField("task_origin_json")
    private String taskOriginJson;


}
