package com.erp.warehouse.dto;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.Builder;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 出库单DTO
 */
public class OutboundOrderDTO {

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class CreateRequest {
        private String outboundType; // sale / transfer
        private Long warehouseId;
        private Long targetWarehouseId;
        private String relatedNo;
        private Long customerId;
        private String customerName;
        private String remark;
        private List<ItemRequest> items;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class ItemRequest {
        private String skuCode;
        private String skuName;
        private Integer planQuantity;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class ShipRequest {
        private String logisticsCompany;
        private String trackingNo;
        private List<ShipItem> items;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class ShipItem {
        private String skuCode;
        private Integer quantity;
    }

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class OutboundOrderVO {
        private Long id;
        private String outboundNo;
        private String outboundType;
        private String outboundTypeLabel;
        private Long warehouseId;
        private String warehouseName;
        private Long targetWarehouseId;
        private String targetWarehouseName;
        private String relatedNo;
        private Long customerId;
        private String customerName;
        private String status;
        private String statusLabel;
        private String logisticsCompany;
        private String trackingNo;
        private String remark;
        private LocalDateTime outboundTime;
        private LocalDateTime createTime;
    }
}
