package com.hys.app.model.erp.dto;

import com.hys.app.model.erp.dos.GoodsDO;
import com.hys.app.model.erp.dos.GoodsSnDO;
import com.hys.app.model.erp.enums.ScanFormCodeTypeEnum;
import com.hys.app.model.erp.vo.GoodsVO;
import com.hys.app.model.erp.vo.ProductVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * 入库单商品明细新增/编辑DTO
 *
 * @author 张崧
 * @since 2023-12-05 15:30:10
 */
@Data
public class WarehouseOutProductDTO {

    private Long id;

    @ApiModelProperty(name = "good_id", value = "skuId")
    @NotNull(message = "skuId不能为空")
    private Long productId;

    @ApiModelProperty(name = "good_Name", value = "商品名称")
    private Long goodName;

    @ApiModelProperty(name = "out_num", value = "出库数量")
    @NotNull(message = "出库数量不能为空")
    @Min(value = 1, message = "出库数量最小为1")
    private Integer outNum;

    private GoodsVO goodsVO;


    private ProductVO productVO;

    @ApiModelProperty(name = "usable_stock", value = "可用库存")
    private Integer usableStock;

    @ApiModelProperty(name = "usable_stock", value = "可用库存")
    private Integer actualStock;

    @ApiModelProperty(name = "good_id", value = "商品id")
    private Long goodsId;

    @ApiModelProperty(name = "scan_iff_num", value = "差异数量，扫码订单打出来的数据必传")
    List<GoodsSnDO> snCodeList;

    @ApiModelProperty(name = "scan_order_id", value = "扫码的单号，扫码订单打出来的数据必传")
    private Long scanOrderId;

    @ApiModelProperty(name = "order_item_id", value = "订单项id,扫码订单打出来的数据必传")
    private Long scanOrderItemId;

    @ApiModelProperty(name = "scan_order_sn", value = "扫码的单号，扫码订单打出来的数据必传")
    private String scanOrderSn;

    @ApiModelProperty(name = "scan_order_type", value = "扫码的单号，扫码订单打出来的数据必传")
    private ScanFormCodeTypeEnum scanOrderType;

    @ApiModelProperty(name = "scan_iff_num", value = "差异数量，扫码订单打出来的数据必传")
    private Integer scanDiffNum;

    @ApiModelProperty(name = "order_id", value = "订单id")
    private Long orderId;

    @ApiModelProperty(name = "order_item_id", value = "订单详情id(不是发货单的)")
    private Long orderItemId;

    @ApiModelProperty(name = "product_stock_id", value = "商品库存id")
    private Long productStockId;


}

