package org.ta.pddserver.model.api.request;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Data
public class FinishUnpackPackageRequest {

//    private String mailNo;

    @Schema(
            description = "集运单号",
            example = "P12345678",
            defaultValue = "",
            requiredMode = Schema.RequiredMode.REQUIRED // 必填
    )
    private String orderCode;

    @Schema(
            description = "异常编号",
            example = "103",
            defaultValue = "",
            requiredMode = Schema.RequiredMode.NOT_REQUIRED // 必填
    )
    private int code;

    @Schema(
            description = "集运单号",
            example = "P12345678",
            defaultValue = "",
            requiredMode = Schema.RequiredMode.NOT_REQUIRED // 必填
    )
    private String logisticsOrderCode;

//    private String status;

    @Schema(
            description = "NORMAL",
            example = "",
            defaultValue = "NORMAL",
            requiredMode = Schema.RequiredMode.REQUIRED // 必填
    )
    private String goodsType;

    @Schema(
            description = "接口",
            example = "finish_pick",
            defaultValue = "",
            requiredMode = Schema.RequiredMode.REQUIRED // 必填
    )
    private String action;

    @Schema(
            description = "包裹信息列表",
            example = "",
            defaultValue = "",
            requiredMode = Schema.RequiredMode.NOT_REQUIRED // 必填
    )
    private List<PackageInfo> packageInfo;

    /**
     * 包裹详情
     */
    @Data
    public static class PackageInfo {

        @Schema(
                description = "包裹长度，单位默认为厘米",
                example = "1",
                defaultValue = "",
                requiredMode = Schema.RequiredMode.REQUIRED // 必填
        )
        private Long length;

        @Schema(
                description = "包裹宽度，单位默认为厘米",
                example = "1",
                defaultValue = "",
                requiredMode = Schema.RequiredMode.REQUIRED // 必填
        )
        private Long width;

        @Schema(
                description = "包裹高度，单位默认为厘米",
                example = "1",
                defaultValue = "",
                requiredMode = Schema.RequiredMode.REQUIRED // 必填
        )
        private Long height;

        @Schema(
                description = "实重重量，单位默认为克",
                example = "2",
                defaultValue = "",
                requiredMode = Schema.RequiredMode.REQUIRED // 必填
        )
        private Long weight;

    }


}
