package com.yc.ship.module.trade.api.dto;

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

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.util.List;


@Schema(description = "订单调度请求DTO")
@Data
@Accessors(chain = true)
public class TradeOrderDispatchReqDTO {

    @Schema(description = "调度订单ID", example = "")
    @NotBlank(message = "调度订单ID不能为空")
    private String dispatchId;

    @Schema(description = "项目编码", example = "")
//    @NotBlank(message = "项目编码不能为空")
    private String projectCode;

    @Schema(description = "调度明细列表", example = "")
//    @NotEmpty(message = "调度明细列表不能为空")
    @Valid
    private List<Detail> dispatchDetailList;

    @Schema(description = "类型0 或不传为后台计调，1为检票", example = "")
    private Integer type;

    @Data
    @Valid
    public static class Detail{
        @Schema(description = "订单ID", example = "")
        private Long orderId;

        @Schema(description = "门票ID", example = "")
        private Long detailId;

        @Schema(description = "子票ID", example = "")
        private Long detailBaseId;

        @Schema(description = "调度数量", example = "")
        private Integer dispatchCount;
    }
}

