package com.yc.ship.module.trade.controller.app.otc.vo;

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

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

@Schema(description = "旅行app补票 Request VO")
@Data
public class AppTradeSuppTicketReqVO {

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

    @Schema(description = "支付金额")
    @NotNull(message = "支付金额不能为空")
    private BigDecimal payAmount;

    @Valid
    @Schema(description = "补票明细")
    @NotEmpty(message = "补票明细不能为空")
    private List<SuppTicketDetailReqVO> suppDetailList;

    @Data
    @Valid
    public static class SuppTicketDetailReqVO{

        @Schema(description = "订单明细ID")
        @NotNull(message = "订单明细ID不能为空")
        private Long tradeDetailId;

        @Schema(description = "原始规格")
        @NotBlank(message = "原始规格不能为空")
        private String specType;

        @Schema(description = "补票规格")
        @NotBlank(message = "补票规格不能为空")
        private String suppSpecType;

        @Schema(description = "补票金额")
        @NotNull(message = "补票金额不能为空")
        private BigDecimal suppAmount;
    }
}
