package org.dromara.inspection.domain.bo;

import org.dromara.inspection.domain.OpsInspectionOrder;
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 org.dromara.system.api.domain.vo.RemoteUserVo;

import java.util.Date;

/**
 * 运维-巡检-工单业务对象 ops_inspection_order
 *
 * @author LionLi
 * @date 2025-09-23
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = OpsInspectionOrder.class, reverseConvertGenerate = false)
public class OpsInspectionOrderBo extends BaseEntity {

    /**
     * 主要id
     */
    private Long id;

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

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

    /**
     * 工单类型1维护保养2检查检测3安装调试4升级改造
     */
    @NotBlank(message = "工单类型1维护保养2检查检测3安装调试4升级改造不能为空", groups = { AddGroup.class, EditGroup.class })
    private String type;

    /**
     * 工单优先级1低2中3高
     */
    @NotBlank(message = "工单优先级1低2中3高不能为空", groups = { AddGroup.class, EditGroup.class })
    private String level;

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

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

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

    /**
     * 相关设备/系统
     */
    @NotBlank(message = "相关设备/系统不能为空", groups = { AddGroup.class, EditGroup.class })
    private String device;

    /**
     * 文件ID
     */
    private String fileId;

    /**
     * 文件路径
     */
    private String fileUrl;

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

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

    /**
     * 是否需要执行人,1是2否(取消使用)
     */
    private String executor;

    /**
     * 执行人ids(取消使用)
     */
    private String executorIds;

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

    /**
     * 派单时间
     */
    private Date sendOrderTime;

    /**
     * 接单时间
     */
    private Date getOrderTime;

    /**
     * 接单人
     */
    private Long getOrderPerson;

    /**
     * 接单人信息
     */
    private RemoteUserVo getOrderPersonVo;

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

    /**
     * 验收结果1通过2需整改
     */
    private String orderResult;

    /**
     * 是否重点跟踪1是2否
     */
    private String point;


}
