package com.tykj.dev.device.repair.subject.vo;

import com.tykj.dev.device.library.subject.vo.ScriptSaveVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * @author dengdiyi
 */
@Data
@ApiModel("维修返回单存储类")
public class RepairBackBillSaveVo {

//    @NotNull(message = "taskId不能为空")
    @Min(value = 1,message = "taskId不能小于1")
    @ApiModelProperty(value = "任务Id")
    private Integer taskId;

    @NotNull(message = "startUseraId不能为空")
    @Min(value = 1,message = "startUseraId不能小于1")
    @ApiModelProperty(value = "退回发起人", example = "1")
    private Integer startUseraId;

//    @NotNull(message = "startUserbId不能为空")
//    @Min(value = 1,message = "startUserbId不能小于1")
    @ApiModelProperty(value = "退回确认人", example = "1")
    private Integer startUserbId;

    @NotNull(message = "receiveUnit不能为空")
    @ApiModelProperty(value = "接收单位", example = "市机要局")
    private String receiveUnit;
    @NotNull(message = "receiveUnit不能为空")
    @ApiModelProperty(value = "接收单位Id", example = "市机要局")
    private Integer receiveUnitId;

    @NotNull(message = "sendUnit不能为空")
    @ApiModelProperty(value = "发起单位", example = "市机要局")
    private String sendUnit;
    @NotNull(message = "sendUnit不能为空")
    @ApiModelProperty(value = "发起单位Id", example = "市机要局")
    private Integer sendUnitId;

//    @NotNull(message = "receiveUseraId不能为空")
//    @Min(value = 1,message = "receiveUseraId不能小于1")
//    @ApiModelProperty(value = "接收经手人", example = "1")
//    private Integer receiveUseraId;

//    @NotNull(message = "applyNumber不能为空")
    @ApiModelProperty(value = "申请文号")
    private String applyNumber;

//    @NotNull(message = "replayNumber不能为空")
    @ApiModelProperty(value = "批复文号")
    private String replayNumber;

    @ApiModelProperty(value = "签发人")
    private String agent;

//    @NotNull(message = "fileName不能为空")
    @ApiModelProperty(value = "出库附件文件名")
    private String fileName;

//    @NotNull(message = "fileUrl不能为空")
    @ApiModelProperty(value = "出库附件文件地址URL")
    private String fileUrl;

    @NotNull(message = "sendingCount不能为空")
    @Min(value = 1,message = "sendingCount不能小于1")
    @ApiModelProperty(value = "应出库装备数量")
    private Integer sendingCount;

    @NotNull(message = "sendedCount不能为空")
    @Min(value = 0,message = "sendedCount不能小于0")
    @ApiModelProperty(value = "已出库装备数量")
    private Integer sendedCount;

    @NotNull(message = "backCheckDetail不能为空")
    @ApiModelProperty(value = "退回装备出库详情(装备主键id+核对结果(0缺失1无误3新增,字符x作为分隔符)),例如10x21x32,意为主键id为1的装备缺失,为2的无误,为3的新增")
    private String backCheckDetail;

    @NotNull(message = "backCheckResult不能为空")
    @ApiModelProperty(value = "退回装备出库检查结果")
    private String backCheckResult;

    @Valid
    @NotEmpty(message = "deviceList不能为空")
    @ApiModelProperty(value = "维修装备详情列表")
    private List<DeviceDetailVo> deviceList;

    @ApiModelProperty(value = "左签章Id")
    private String leftSignatureId;

    private List<ScriptSaveVo> scriptSaveVos;
}
