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


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 = "导游退款请求")
@Data
public class GuideRefundReqDTO {

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

    @Schema(description = "导游代退ID", example = "123")
    private Long refundId;

    @Schema(description = "平台退款金额", example = "123")
    private BigDecimal refundAmount;

    @Schema(description = "导游代退金额", example = "123")
    private BigDecimal guideRefundAmount;

    @Schema(description = "代退明细")
    @Valid
    @NotEmpty(message = "代退明细不能为空")
    private List<refundDetail> refundDetailList;

    @Schema(description = "代退明细")
    @Data
    @Valid
    public static class refundDetail{
        @Schema(description = "代退明细")
        @NotNull(message = "代退明细ID不能为空")
        private Long tradeDetailId;

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

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