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

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.util.Date;

@ApiModel("管理后台 - 采收入库批次保存（创建/更新） Request VO")
@Data
public class HarvestBatchSaveReqVO {

    @ApiModelProperty(value = "id")
    private Long id;

    @ApiModelProperty(value = "采收批次id", required = true)
    @NotNull(message = "采收批次id不能为空")
    private String harvestBatchId;

//    @ApiModelProperty(value = "入库单号", required = true)
//    @NotNull(message = "入库单号不能为空")
//    private String harvestId;

    @ApiModelProperty(value = "生产日期", required = true)
    @NotNull(message = "生产日期不能为空")
    private Date harvestDate;

    @ApiModelProperty(value = "商品id", required = true)
    @NotNull(message = "商品id不能为空")
    private String goodsId;

    @ApiModelProperty(value = "商品数量")
    @NotNull(message = "商品数量不能为空")
    @Min(value = 1, message = "商品数量至少为1")
    // @JsonSerialize(using = BigDecimalSerializer.class) // 四舍五入 自动保留2位小数
    private Integer goodsNum;

    @ApiModelProperty(value = "采收批次说明")
    @Length(max = 255)
    private String remarks;

}
