package com.yc.ship.module.trade.controller.admin.order.vo.refund;

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.util.List;

@Schema(description = "退款 Request VO")
@Data
public class TradeRefundSimpleReqVO {

    @Schema(description =  "退款原因", example = "")
    @NotBlank(message = "退款原因不能为空")
    private String reason;

    @Schema(description =  "订单列表", example = "")
    @Valid
    @NotEmpty
    private List<OrderItem> orderItems;

    @Data
    @Valid
    public static class OrderItem{
        @Schema(description =  "订单ID", example = "")
        @NotNull(message = "订单ID不能为空")
        private Long orderId;

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

        @Schema(description =  "是否包含已退的手续费", example = "")
        private boolean isContainFee;
    }
}
