package cn.iocoder.yudao.module.product.controller.admin.inspection.vo;

import cn.iocoder.yudao.module.product.controller.admin.inspectionitem.vo.InspectionItemSaveReqVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

@ApiModel("管理后台 - 检验检疫更新 Request VO")
@Data
public class InspectionUpdateReqVO {

    @ApiModelProperty(value = "ID", required = true)
    @NotNull(message = "ID不能为空")
    private Long id;

    @ApiModelProperty(value = "生产时间", required = true)
    @NotNull(message = "生产时间不能为空")
    private Date harvestTime;

    @ApiModelProperty(value = "执行标准", required = true)
    @NotNull(message = "执行标准不能为空")
    private String inspectionStandard;

    @ApiModelProperty(value = "检验结果 0合格 1不合格", required = true)
    @NotNull(message = "检验结果 0合格 1不合格不能为空")
    private Integer inspectionResult;

    @ApiModelProperty(value = "自检检验项目", required = true)
    @NotNull(message = "自检检验项目不能为空")
    private String inspectionOwnItem;

    @ApiModelProperty(value = "检验人", required = true)
    @NotNull(message = "检验人不能为空")
    private String inspectionUser;

    @ApiModelProperty(value = "委托检验项目")
    private String inspectionEntrustItem;

    @ApiModelProperty(value = "检测机构")
    private String inspectionOrganization;

    @ApiModelProperty(value = "检验日期", required = true)
    @NotNull(message = "检验日期不能为空")
    private Date inspectionDate;

    @ApiModelProperty(value = "等级")
    private String inspectionLevel;

    @ApiModelProperty(value = "签发日期")
    private Date issuanceDate;

    @ApiModelProperty(value = "检测图片")
    private String inspectionImgUrl;

    @ApiModelProperty(value = "检测视频")
    private String inspectionVideoUrl;

    @ApiModelProperty(value = "检验-检测项目")
    @NotEmpty(message = "检测项目不能为空")
    @Valid
    private List<InspectionItemSaveReqVO> inspectionItems;

}
