package com.liquidnet.service.goblin.param.shouqianba.callback;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@ApiModel(value = "SqbRefundContentDTO", description = "收钱吧退款推送内容详情")
public class RefundCallbackContent {

    @ApiModelProperty(value = "售后单号 (全局唯一)", example = "71582143744560")
    private String ticketSn;

    @ApiModelProperty(value = "订单号", example = "2101056320290513285")
    private String orderSn;

    @ApiModelProperty(value = "原状态")
    private Integer sourceState;

    @ApiModelProperty(value = "目标状态 (20:完成, 15:退款完成, 0:创建, 10:退款中, 30:取消退款)", example = "15")
    private Integer targetState;

    @ApiModelProperty(value = "下单金额 (单位：分)", example = "100")
    private Long amount;

    @ApiModelProperty(value = "申请金额 (单位：分)", example = "100")
    private Long applyAmount;

    @ApiModelProperty(value = "请求号")
    private String requestId;

    @ApiModelProperty(value = "来源 (如: EXTERN)")
    private String requestSource;

    @ApiModelProperty(value = "退款的商品信息")
    private SqbRefundItemContainer item;

    @Data
    @ApiModel("SqbRefundItemContainer")
    public static class SqbRefundItemContainer {

        @ApiModelProperty(value = "退款类型 (1:商品, 2:金额)")
        private Byte type;

        @ApiModelProperty(value = "商品明细列表")
        private List<SqbRefundItemDetail> items;
    }

    @Data
    @ApiModel("SqbRefundItemDetail")
    public static class SqbRefundItemDetail {

        @ApiModelProperty(value = "spu id")
        private String spuId;

        @ApiModelProperty(value = "sku id")
        private String skuId;

        @ApiModelProperty(value = "标题")
        private String title;

        @ApiModelProperty(value = "数量")
        private String quantity;

        @ApiModelProperty(value = "退款类型 (0:正常商品, 1:自定义商品)")
        private Byte type;
    }
}
