
package com.tmerclub.cloud.api.order.vo;

import com.tmerclub.cloud.common.order.vo.RefundOrderItemVO;
import com.tmerclub.cloud.common.vo.BaseVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 订单退款记录信息VO
 *
 * @author tmerclub
 * @date 2020-12-05 14:13:50
 */
@Data
public class OrderRefundVO extends BaseVO implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;
    @Schema(description = "记录ID")
    private Long refundId;

    @Schema(description = "支付系统 0默认1通联")
    private Integer paySysType;

    @Schema(description = "店铺ID")
    private Long shopId;

    @Schema(description = "买家ID")
    private Long userId;

    @Schema(description = "订单号")
    private Long orderId;

    @Schema(description = "订单项ID(0:为全部订单项)")
    private Long orderItemId;

    @Schema(description = "退货数量(0:为全部订单项)")
    private Integer refundCount;

    @Schema(description = "退还积分")
    private Long refundScore;

    @Schema(description = "退款金额")
    private Long refundAmount;

    @Schema(description = "平台退款金额（退款时将这部分钱退回给平台，所以商家要扣除从平台这里获取的金额）")
    private Long platformRefundAmount;

    @Schema(description = "退款单总分销金额")
    private Long distributionTotalAmount;

    @Schema(description = "退款单类型（1:整单退款,2:单个物品退款）")
    private Integer refundType;

    @Schema(description = "申请类型:1,仅退款,2退款退货")
    private Integer applyType;

    @Schema(description = "是否接收到商品(1:已收到,0:未收到)")
    private Integer isReceived;

    @Schema(description = "退款关闭原因(1.买家撤销退款 2.卖家拒绝退款 3.退款申请超时被系统关闭)")
    private Integer closeType;

    @Schema(description = "处理退款状态:(1.买家申请 2.卖家接受 3.买家发货 4.卖家收货 5.退款成功  -1.退款关闭)详情见ReturnMoneyStsType")
    private Integer returnMoneySts;

    @Schema(description = "申请原因")
    private Integer buyerReason;

    @Schema(description = "申请原因 中文描述")
    private String buyerReasonValue;

    @Schema(description = "申请说明")
    private String buyerDesc;

    @Schema(description = "联系方式（退款时留下的手机号码）")
    private String buyerMobile;

    @Schema(description = "文件凭证(逗号隔开)")
    private String imgUrls;

    @Schema(description = "超时时间（超过该时间不处理，系统将自动处理）（保留字段）")
    private Date overTime;

    @Schema(description = "拒绝原因")
    private String rejectMessage;

    @Schema(description = "卖家备注")
    private String sellerMsg;

    @Schema(description = "受理时间")
    private Date handelTime;

    @Schema(description = "发货时间")
    private Date deliveryTime;

    @Schema(description = "收货时间")
    private Date receiveTime;

    @Schema(description = "关闭时间")
    private Date closeTime;

    @Schema(description = "确定时间(确定退款时间)")
    private Date decisionTime;

    @Schema(description = "退款时间")
    private Date refundTime;

    @Schema(description = "付款时间")
    private Date payTime;

    @Schema(description = "订单实付金额")
    private Long actualTotal;

    @Schema(description = "订单实付积分")
    private Long orderScore;

    @Schema(description = "订单状态")
    private Integer orderStatus;

    @Schema(description = "退款状态")
    private Integer refundStatus;

    @Schema(description = "店铺名称")
    private String shopName;

    @Schema(description = "支付的时候，支付id")
    private Long payId;

    @Schema(description = "支付方式")
    private Integer payType;

    @Schema(description = "订单项")
    private List<RefundOrderItemVO> orderItems;

    @Schema(description = "退款地址信息")
    private OrderRefundAddrVO orderRefundAddr;


    @Override
    public String toString() {
        return "OrderRefundVO{" +
                "refundId=" + refundId +
                ", paySysType=" + paySysType +
                ", shopId=" + shopId +
                ", userId=" + userId +
                ", orderId=" + orderId +
                ", orderItemId=" + orderItemId +
                ", refundCount=" + refundCount +
                ", refundScore=" + refundScore +
                ", refundAmount=" + refundAmount +
                ", platformRefundAmount=" + platformRefundAmount +
                ", distributionTotalAmount=" + distributionTotalAmount +
                ", refundType=" + refundType +
                ", applyType=" + applyType +
                ", isReceived=" + isReceived +
                ", closeType=" + closeType +
                ", returnMoneySts=" + returnMoneySts +
                ", buyerReason=" + buyerReason +
                ", buyerReasonValue='" + buyerReasonValue + '\'' +
                ", buyerDesc='" + buyerDesc + '\'' +
                ", buyerMobile='" + buyerMobile + '\'' +
                ", imgUrls='" + imgUrls + '\'' +
                ", overTime=" + overTime +
                ", rejectMessage='" + rejectMessage + '\'' +
                ", sellerMsg='" + sellerMsg + '\'' +
                ", handelTime=" + handelTime +
                ", deliveryTime=" + deliveryTime +
                ", receiveTime=" + receiveTime +
                ", closeTime=" + closeTime +
                ", decisionTime=" + decisionTime +
                ", refundTime=" + refundTime +
                ", payTime=" + payTime +
                ", actualTotal=" + actualTotal +
                ", orderScore=" + orderScore +
                ", orderStatus=" + orderStatus +
                ", refundStatus=" + refundStatus +
                ", shopName='" + shopName + '\'' +
                ", payId=" + payId +
                ", payType=" + payType +
                ", orderItems=" + orderItems +
                ", orderRefundAddr=" + orderRefundAddr +
                '}';
    }
}
