package com.fjhx.params.order;

import com.fjhx.enums.stock.OutTypeEnum;
import com.fjhx.params.stock.StockChangeVo;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
public class IssueVo {

    /**
     * 订单id
     */
    private Long orderId;

    /**
     * 仓库id
     */
    private Long warehouseId;

    /**
     * 快递单号
     */
    private String logisticsCode;

    /**
     * 快递公司编码
     */
    private String logisticsCompanyCode;

    /**
     * 类型：1、京东订单出库 2、销售订单出库
     */
    private OutTypeEnum outTypeEnum;

    /**
     * 出库明细
     */
    private List<IssueDetails> orderDetailsList;

    @Data
    public static class IssueDetails implements StockChangeVo.ChangeDetails {

        private Long orderDetailsId;
        private Long productId;
        private BigDecimal changeQuantity;

        @Override
        public Long getGoodsId() {
            return this.productId;
        }

        @Override
        public BigDecimal getChangeQuantity() {
            return this.changeQuantity;
        }

    }
}
