package org.dromara.inspection.domain.bo;

import org.dromara.inspection.domain.OpsInspectionTestTask;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 运维-巡检-试验任务业务对象 ops_inspection_test_task
 *
 * @author LionLi
 * @date 2025-09-20
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = OpsInspectionTestTask.class, reverseConvertGenerate = false)
public class OpsInspectionTestTaskBo extends BaseEntity {

    /**
     *
     */
    private Long id;

    /**
     * 项目ID(电站ID)
     */
    @NotNull(message = "项目ID(电站ID)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long projectId;

    /**
     * 任务名称
     */
    @NotBlank(message = "任务名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String taskName;

    /**
     * 测试对象
     */
    @NotBlank(message = "测试对象不能为空", groups = { AddGroup.class, EditGroup.class })
    private String testObject;

    /**
     *
     */
    @NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date beginTime;

    /**
     *
     */
    @NotNull(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date endTime;

    /**
     *
     */
    @NotBlank(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private String timeInfo;

    /**
     * 执行人员
     */
    @NotNull(message = "执行人员不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long person;

    /**
     * 节点IDS
     */
    @NotNull(message = "节点不能为空", groups = { AddGroup.class, EditGroup.class })
    private String nodeIds;

    /**
     * 状态,1待执行2暂停3失败4执行中5已完成
     */
    @NotBlank(message = "状态,1待执行2暂停3失败4执行中5已完成不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 是否已分析1未分析2已分析
     */
    private String unPack;

    /**
     * 关联测试计划ID
     */
    @NotNull(message = "关联测试计划ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long testPlanId;

    /**
     * 试验环境
     */
    private String testSetting;

    /**
     * 开始时间
     */
    private Date planBeginTime;

    /**
     * 进度
     */
//    private Long progress;

    /**
     * 失败原因
     */
    private String failReason;

    /**
     * 失败时间
     */
    private Date failTime;

    /**
     * 失败阶段
     */
    private Long failPhase;

    /**
     * 失败原因分析
     */
    private String faileAnalyze;

    /**
     * 改进建议
     */
    private String faileTips;

    /**
     * 试验时长(分钟)
     */
    private Long testLongTime;

    /**
     * 结果
     */
    private String testFinal;

    /**
     * 结果详情
     */
    private String finalInfo;

    /**
     * 暂停原因
     */
    private String pauseFor;

    /**
     * 暂停时间
     */
    private Date pauseTime;

    /**
     * 计划完成时间
     */
    private Date planFinishTime;

}
