package cn.iocoder.yudao.module.mes.controller.admin.zjtaskresults.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import java.util.List;

@Schema(description = "管理后台 - 检验任务-检验结果批量更新 Request VO")
@Data
public class ZjTaskResultsBatchUpdateReqVO {

    @Schema(description = "批量更新的检验结果列表", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "更新列表不能为空")
    @Valid
    private List<ResultItem> results;

    /**
     * 批量更新子项
     */
    @Data
    public static class ResultItem {
        @Schema(description = "检验结果ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8755")
        private Long id;

        @Schema(description = "检验结果 0-待检测 1-检测通过 2-检测不通过", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
        private Integer zjResult;

        @Schema(description = "图片路径", example = "/upload/123.jpg")
        private String images;

        @Schema(description = "任务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5389")
        private Long taskId;
    }
}