package org.dromara.inspection.domain.bo;

import com.baomidou.mybatisplus.annotation.TableField;
import org.dromara.inspection.domain.OpsInspectionTask;
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.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 运维-巡检计划-任务业务对象 ops_inspection_task
 *
 * @author LionLi
 * @date 2025-09-20
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = OpsInspectionTask.class, reverseConvertGenerate = false)
public class OpsInspectionTaskBo extends BaseEntity {

    /**
     *
     */
    private Long id;

    private Long projectId;

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

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

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

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

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

    /**
     * 节点ids
     */
    private String nodeIds;

    /**
     * 状态   1待执行2已延期3执行中4已完成
     */
    @NotNull(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String taskType;

    /**
     * 发现问题种类,1磁盘使用率2内存使用率3服务状态4响应时间5设备运行状态
     */
    private String problemType;

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

    /**
     * 完成时间
     */
    private Date finishTime;

}
