package com.ms.api.dto.dsapi.response;

import lombok.Data;
import lombok.EqualsAndHashCode;

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

@EqualsAndHashCode(callSuper = true)
@Data
public class GetPurchaseOrderItemsAndSourceItemsResponseDTO extends CommonResponseDTO {
    private Map<String, SourceProductInfo> sourceItemIdAndProductInfoMap;
    private Map<String, CommonResponseDTO> sourceItemIdAndProductApiRetMap;
    private Map<String, Map<String, List<SourceItemSkuRelation>>> platformItemIdAndSourceItemSkuRelationMap;
    private Map<String, List<PurchaseOrderItem>> platformOrderIdAndPurchaseOrderItemsMap;
    private Map<String, List<PurchaseOrder>> platformOrderIdAndPurchaseOrdersMap;
    private Map<String, SourceItemInfo> platformItemIdAndSourceItemInfoMap;

    @Data
    public static class SourceItemSkuRelation implements Serializable {
        private Integer moveProductManualSourceSkuRelationId;
        private Integer moveProductManualSourceId;
        private Long platformSkuId;
        private Long sourceSkuId;
        private Integer sourceNum;
        private String confirmNumRatio;
        private String gmtCreate;
        private String gmtModified;
        private Long platformItemId;
        private Long sourceItemId;
    }

    @Data
    public static class PurchaseOrderItem implements Serializable {
        private Long purchaseOrderItemId;
        private Long purchaseOrderId;
        private Long sourceOrderId;
        private Long productId;
        private Long skuId;
        private String memberId;
        private String productImgUrl;
        private String statusStr;
        private String refundStatus;
        private String productSnapshotUrl;
        private Double itemAmount;
        private Double price;
        private Long subItemId;
        private String specId;
        private String weight;
        private String quantity;
        private String subItemIdString;
        private String unit;
        private Integer quantityFactor;
        private String name;
        private Integer logisticsStatus;
        private Double refund;
        private String status;
        private String weightUnit;
        private String skuSubName;
        private String gmtCreate;
        private String gmtModified;
        private String platformOrderId;
        private Long platformItemId;
        private Long platformSkuId;
        private String flow;
        private String refundStatusText;
        private String statusText;
    }

    @Data
    public static class PurchaseOrder implements Serializable {
        private Long purchaseOrderId;
        private String sourceOrderId;
        private String memberId;
        private String payTime;
        private Double discount;
        private String buyerLevel;
        private Double sumProductPayment;
        private String buyerFeedback;
        private Integer sellerOrder;
        private String buyerLoginId;
        private String modifyTime;
        private String subBuyerLoginId;
        private String completeTime;
        private String sellerLoginId;
        private String buyerId;
        private String closeOperateType;
        private Double totalAmount;
        private Double shippingFee;
        private String sellerId;
        private String buyerUserId;
        private Double refund;
        private String status;
        private Double refundPayment;
        private Double couponFee;
        private String refundStatus;
        private String remark;
        private String confirmedTime;
        private String tradeType;
        private String receivingTime;
        private String idOfStr;
        private String refundStatusForAs;
        private String sellerUserId;
        private String createTime;
        private String refundId;
        private String tradeTypeDesc;
        private String tradeTypeCode;
        private String waybill;
        private Long logisticsId;
        private String logisticsName;
        private String alibabaLogisticsIds;
        private String toFullNameMd5;
        private String toMobileMd5;
        private String toFullNameS;
        private String toMobileS;
        private String filterIsTown;
        private String filterItemCount;
        private String filterItemTotal;
        private String sellerNote;
        private String platformPushStatus;
        private String purchaseSource;
        private String exceptionType;
        private String oldExceptionType;
        private String gmtCreate;
        private String gmtModified;
        private String duplicateSmd5;
    }

    @Data
    public static class SourceItemInfo implements Serializable {
        private SourceProductInfo productInfo;
        private Long sourceItemId;
        private CommonResponseDTO productApiRet;
    }
}
