package com.sw.common.accessory.server.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author zhaowenjie
 */
@Data
public class StockReturn {
    @ApiModelProperty("辅材ID")
    @NotNull(message = "辅材ID，不能为空")
    Long id;
    @ApiModelProperty("数量")
    @NotNull(message = "数量，不能为空")
    @Min(value = 1, message = "数量只能为1")
    @Max(value = 1, message = "数量只能为1")
    Integer number;
    @NotBlank(message = "退库原因，不能为空")
    @ApiModelProperty(value = "退库原因", required = true)
    String reason;
    @ApiModelProperty(value = "是否异常审核")
    boolean exceptionAudit = false;
    @ApiModelProperty(value = "是否材质异常")
    boolean materialAnomaly = false;
    @NotBlank(message = "异常描述，不能为空")
    @ApiModelProperty(value = "异常描述", required = true)
    String abnormalDescription;
    @NotBlank(message = "破损程度，不能为空")
    @ApiModelProperty(value = "破损程度", required = true)
    String degreeDamage;
}
