package com.fjhx.params.stock;

import lombok.Data;

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

@Data
public class InStockAdd {

    @NotNull(message = "物流id不能为空")
    private Long logisticsInfoId;

    @Valid
    @NotEmpty(message = "入库明细不能为空")
    private List<InStockAddDetails> list;

    @Data
    public static class InStockAddDetails implements StockChangeVo.ChangeDetails {

        /**
         * 业务ID
         */
        @NotNull(message = "物流明细id不能为空")
        private Long businessId;

        /**
         * 物品ID
         */
        @NotNull(message = "物品id不能为空")
        private Long goodsId;

        /**
         * 仓库ID
         */
        @NotNull(message = "仓库id不能为空")
        private Long warehouseId;

        /**
         * 入库数量
         */
        @NotNull(message = "入库数量不能为空")
        private BigDecimal changeQuantity;

        /**
         * 备注
         */
        private String remarks;

    }

}
