package com.cmvr.aima.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import com.cmvr.common.annotation.Excel;
import com.cmvr.common.core.domain.BaseEntity;

import java.util.Date;

/**
 * 爱玛任务执行实例对象 aima_task_instance
 * 
 * @author cmvr-iot
 * @since 2026-06-22
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel("爱玛任务执行实例")
public class AimaTaskInstance extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键ID")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    @Excel(name = "任务ID")
    @ApiModelProperty("任务ID")
    private String taskId;

    @Excel(name = "手机ID")
    @ApiModelProperty("手机ID")
    private String phoneId;

    @Excel(name = "车辆ID")
    @ApiModelProperty("车辆ID")
    private String vehicleId;

    @Excel(name = "第几次执行")
    @ApiModelProperty("第几次执行")
    private Integer executionNumber;

    @Excel(name = "执行状态")
    @ApiModelProperty("执行状态(0待执行 1执行中 2已完成 3已取消 4执行失败 5已暂停)")
    private Integer status;

    /** 流程实例id（关联test模块） */
    @ApiModelProperty("流程实例id")
    private String taskInsId;

    @Excel(name = "总用例数")
    @ApiModelProperty("总用例数")
    private Integer totalCases;

    @Excel(name = "已完成用例数")
    @ApiModelProperty("已完成用例数")
    private Integer completedCases;

    @Excel(name = "通过用例数")
    @ApiModelProperty("通过用例数")
    private Integer passedCases;

    @Excel(name = "失败用例数")
    @ApiModelProperty("失败用例数")
    private Integer failedCases;

    @Excel(name = "执行进度")
    @ApiModelProperty("执行进度(百分比，保留2位小数)")
    private Double progress;

    @Excel(name = "开始时间")
    @ApiModelProperty("开始时间")
    private Date startTime;

    @Excel(name = "结束时间")
    @ApiModelProperty("结束时间")
    private Date endTime;

}
