package com.docus.server.vo.scheduling.management.schterminator;

import com.docus.server.enums.BusyStateEnum;
import com.docus.server.enums.OnlineStateEnum;
import com.docus.server.enums.RestrictStateEnum;
import com.docus.server.vo.scheduling.management.schcollector.LoadSchCollectorVO;
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;
import java.util.List;

/**
 * 执行管理器 VO
 *
 * @author AutoGenerator
 * @since 2023-07-15
 */
@Data
@ApiModel(value = "SchTerminatorVO对象", description = "执行管理器")
public class SchTerminatorVO implements Serializable {

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

    @ApiModelProperty(value = "终端IP")
    private String terminatorIp;

    @ApiModelProperty(value = "资源管理器名称")
    private String terminatorName;

    @ApiModelProperty(value = "只干某些任务，任务偏好属性")
    private String onlyCollectorIds;

    @ApiModelProperty(value = "优先干某些任务，任务偏好属性（优先给哪个采集器，若不空闲再给任意采集器）")
    private String priorityCollectorIds;

    @ApiModelProperty(value = "是否限制采集器类型，0：否，1：是")
    private RestrictStateEnum restrictState;

    @ApiModelProperty(value = "忙闲状态，0：空闲，1：繁忙")
    private BusyStateEnum busyState;

    @ApiModelProperty(value = "在线状态，0：离线，1：在线")
    private OnlineStateEnum onlineState;

    @ApiModelProperty(value = "最近任务执行时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastTaskExecTime;

    @ApiModelProperty(value = "正在执行任务的名称")
    private String executingTaskName;

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

    @ApiModelProperty(value = "当前终端注册上来的采集器信息")
    private List<LoadSchCollectorVO> loadSchCollectorVOList;

    @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;

}
