package org.dromara.inspection.domain.bo;

import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.inspection.domain.ArExecution;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;

import jakarta.validation.constraints.NotNull;
import java.util.Date;

/**
 * 任务执行记录业务对象 ar_execution
 *
 * @author Lion Li
 * @date 2025-01-13
 */

@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = ArExecution.class, reverseConvertGenerate = false)
public class ArExecutionBo extends BaseEntity {

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

    /**
     * 任务模板ID
     */
    @NotNull(message = "任务模板ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long taskId;

    /**
     * 执行编号
     */
    private String executionCode;

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

    /**
     * 使用设备ID
     */
    private Long deviceId;

    /**
     * 操作人ID
     */
    private Long operatorId;

    /**
     * 操作人姓名
     */
    private String operatorName;

    /**
     * 监护人ID
     */
    private Long custodianId;

    /**
     * 监护人姓名
     */
    private String custodianName;

    /**
     * 发令人ID
     */
    private Long senderId;

    /**
     * 发令人姓名
     */
    private String senderName;

    /**
     * 收令人ID
     */
    private Long recipientId;

    /**
     * 收令人姓名
     */
    private String recipientName;

    /**
     * 值长ID
     */
    private Long commanderId;

    /**
     * 值长姓名
     */
    private String commanderName;

    /**
     * 状态(pending待执行/in_progress执行中/completed已完成/cancelled已取消)
     */
    private String status;

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

    /**
     * 结束时间
     */
    private Date endTime;

    /**
     * 总步骤数
     */
    private Integer totalSteps;

    /**
     * 已完成步骤数
     */
    private Integer completedSteps;

}
