package com.docus.server.dto.scheduling.management.schcollectrecord;

import com.docus.server.enums.StateEnum;
import com.docus.server.enums.SubStateEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 采集记录表 AddDTO
 *
 * @author AutoGenerator
 * @since 2023-07-15
 */
@Data
@ApiModel(value = "AddSchCollectRecordDTO对象", description = "采集记录表")
public class AddSchCollectRecordDTO implements Serializable {

    @ApiModelProperty(value = "主键")
    private Long id;

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

    @ApiModelProperty(value = "采集器id")
    private Long collectorId;

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

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

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

    @ApiModelProperty(value = "任务起始时间范围")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;

    @ApiModelProperty(value = "任务结束时间范围")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

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

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

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

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

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

    @ApiModelProperty(value = "入库时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "入库更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

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


}
