package com.ms.api.dto.order;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @Author: laixw
 * @Date: 2023/9/1
 */
@Data
public class OrderMultiPackageOutstorageDTO implements Serializable {

    /**
     * 订单号
     */
    private String orderId;

    /**
     * 包裹信息
     */
    private List<PackageInfoDTO> packageList;

    /**
     * 出库操作来源
     */
    private String deliverySource;

    @Data
    public static class PackageInfoDTO implements Serializable {
        /**
         * 物流id
         */
        private String logisticsId;

        /**
         * 运单号
         */
        private String waybillCode;

        /**
         * 商品id
         */
        private String productId;

        /**
         * 订单规格SkuId
         */
        private Long skuId;

        /**
         * 当前包裹商品数量
         */
        private Integer shippedNum;

        /**
         * 订单信息
         */
        private List<ShippedOrderInfo> shippedOrderInfo;

        // =========== 内部使用
        private String companyCode;
        private String company;
        private String logisticsName;
        private String logisticsCode;
    }

    @Data
    public static class ShippedOrderInfo implements Serializable {

        /**
         * 订单id
         */
        private String shippedOrderId;

        /**
         * 当前包裹商品数量
         */
        private Integer shippedNum;
    }
}
