package com.base.api.model;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;
import java.util.Objects;

@Data
public class FzTaskRpcDTO {

    private String id;
    @ApiModelProperty("仿真任务编号")
    private String reqId;
    @ApiModelProperty("目标名称")
    private String targetName;
    @ApiModelProperty("目标编号")
    private String targetCode;
    @ApiModelProperty("目标编号")
    private List<String> targetCodes;
    @ApiModelProperty("仿真任务开始时间")
    private Date startTime;
    @ApiModelProperty("仿真任务结束时间")
    private Date endTime;
    @ApiModelProperty("优先级")
    private String priority;
    @ApiModelProperty("任务提出时间")
    private Date emulationMakeTime;
    @ApiModelProperty("需求有效期开始时间")
    private Date reqStartTime;
    @ApiModelProperty("需求有效期结束时间")
    private Date reqEndTime;
    @ApiModelProperty("目标范围")
    private List<PointRpcDTO> pointDTOList;
    @ApiModelProperty("绑定载荷")
    private List<String> payloadIdList;
    @ApiModelProperty("当前任务状态 0待执行 1执行中 2成功 3失败")
    private String fzTaskState;
    @ApiModelProperty("错误信息")
    private String errorInfo;
    @ApiModelProperty("当前步骤 TASK_GET,TASK_ACCESS_COMPUTE,TASK_PLANNING,TASK_MAKE_PUBLISH")
    private String fzTaskStep;
    @ApiModelProperty("覆盖率")
    private String coverageResult;
    @ApiModelProperty("任务Id")
    private String taskId;
    @ApiModelProperty("工作模式")
    private String workMode;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        FzTaskRpcDTO fzTaskDTO = (FzTaskRpcDTO) o;
        return Objects.equals(reqId, fzTaskDTO.reqId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(reqId);
    }
}
