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.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Schema(description = "游客补录请求vo")
@Data
@Accessors(chain = true)
public class TradeBindVisitorReqDTO {

    @Schema(description = "订单ID", example = "")
    @NotNull(message = "订单ID不能为空")
    private Long orderId;

    @Schema(description = "补录项", example = "")
    @NotEmpty(message = "补录项不能为空")
    @Valid
    private List<BindItem> bindItemList;

    @Schema(description = "补录项")
    @Data
    @Valid
    public static class BindItem{

        @Schema(description = "voucherCode", example = "")
        @NotNull(message = "券码不能为空")
        private String voucherCode;

        @Schema(description = "游客信息", example = "")
        @NotEmpty(message = "游客信息不能为空")
        @Valid
        private List<TradeOrderCreateReqDTO.Visitor> visitorList;
    }
}

