package com.erp.platformsync.dto.pdd;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

/**
 * 拼多多退款/售后DTO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PddRefundDTO {

    /**
     * 退款单号
     */
    private String refundId;

    /**
     * 订单编号
     */
    private String orderSn;

    /**
     * 售后编号
     */
    private String afterSalesId;

    /**
     * 售后类型: 1-仅退款, 2-退款退货
     */
    private Integer type;

    /**
     * 售后状态: 0-待审核, 1-审核通过, 2-审核拒绝, 3-已撤销, 4-已同意退货
     */
    private Integer status;

    /**
     * 退款原因
     */
    private String reason;

    /**
     * 退款说明
     */
    private String reasonDesc;

    /**
     * 退款金额
     */
    private BigDecimal refundAmount;

    /**
     * 退货数量
     */
    private Integer returnQuantity;

    /**
     * 买家昵称
     */
    private String buyerNick;

    /**
     * 申请时间
     */
    private String applyTime;

    /**
     * 更新时间
     */
    private String updateTime;

    /**
     * 店铺ID
     */
    private Long shopId;

    /**
     * 商品信息
     */
    private List<PddRefundItemDTO> items;

    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class PddRefundItemDTO {
        private String skuId;
        private String skuName;
        private String goodsName;
        private Integer quantity;
        private BigDecimal refundAmount;
    }
}
