
package com.tmerclub.cloud.order.vo;

import com.tmerclub.cloud.common.order.vo.RefundOrderItemVO;
import com.tmerclub.cloud.common.vo.BaseVO;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;

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
 */
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 allinpayRefundPurchaseAmount;

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

    @Schema(description = "平台佣金退款金额")
    private Long platformRefundCommission;

    @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 String shopImgUrls;

    @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 supplierTime;

    @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 = "订单支付ids")
    private String payIds;

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

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

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

    /**
     * 是否为未成团而退款的团购订单
     */
    private Integer unSuccessGroupOrder;

    @NotNull(message = "供应商id")
    private Long supplierId;

    @Schema(description = "供应商处理状态， -1.商家自行处理 0.待供应商处理 1.供应商已同意 2.供应商已拒绝")
    private Integer supplierHandleStatus;

    @Schema(description = "采购退款金额")
    private Long purchaseRefundAmount;

    @Schema(description = "采购的平台佣金退款金额")
    private Long purPlatformRefundCommission;

    @Schema(description = "订单运费")
    private Long freightAmount;

    @Schema(description = "供应商订单运费")
    private Long supplierFreightAmount;

    @Schema(description = "是否待采购 1.是 0.否")
    private Integer waitPurchase;

    @Schema(description = "订单项采购价")
    private Long itemPurchaseAmount;


    @Schema(description = "退款退回的赠品订单项ids")
    private String returnGiveawayIds;

    @Schema(description = "当前退款的实付金额（实付金额减去不退回赠品的金额）")
    private Long refundActualTotal;

    @Schema(description = "平台运费减免金额")
    private Long platformFreeFreightAmount;

    @Schema(description = "预售类型 -1.未开启预售 0.全款预售类型 1.定金预售")
    private Integer preSaleType;

    /**
     * 最后一单
     */
    private Boolean lastOrder;

    /**
     * 商家备注信息（退款单移交供应商处理时保存）
     */
    @Hidden
    private String shopSellerMsg;

    @Schema(description = "平台介入状态 -1.没有介入 1.用户申请介入 2.平台同意介入 3.平台拒绝介入 5.平台同意退款成功")
    private Integer platformInterventionStatus;

    @Schema(description = "用户申请介入理由")
    private String applyInterventionReason;

    @Schema(description = "用户申请介入凭证")
    private String applyInterventionImgUrls;

    @Schema(description = "平台介入退款方式 1.商家承担 2.商家供应商承担（供应商发货订单） 3.不同意退款")
    private Integer interventionRefundType;

    @Schema(description = "平台介入前的退款金额")
    private Long afterInterventionRefundAmount;

    @Schema(description = "平台留言")
    private String platformMessage;

    @Schema(description = "申请介入时间")
    private Date applyInterventionTime;

    @Schema(description = "用户/商家/供应商补充凭证截至时间，平台开始处理时间")
    private Date interventionEndTime;

    @Schema(description = "平台介入处理截至时间")
    private Date platformProcessingEndTime;

    @Schema(description = "介入完成时间")
    private Date interventionFinishTime;

    @Schema(description = "平台介入凭证列表")
    private List<OrderRefundInterventionVO> orderRefundInterventionList;

    @Schema(description = "能否申请平台介入or申请退款")
    private Boolean canApplyRefund;

    public Boolean getCanApplyRefund() {
        return canApplyRefund;
    }

    public void setCanApplyRefund(Boolean canApplyRefund) {
        this.canApplyRefund = canApplyRefund;
    }

    public Date getPlatformProcessingEndTime() {
        return platformProcessingEndTime;
    }

    public void setPlatformProcessingEndTime(Date platformProcessingEndTime) {
        this.platformProcessingEndTime = platformProcessingEndTime;
    }

    public Date getInterventionEndTime() {
        return interventionEndTime;
    }

    public void setInterventionEndTime(Date interventionEndTime) {
        this.interventionEndTime = interventionEndTime;
    }

    public String getShopImgUrls() {
        return shopImgUrls;
    }

    public void setShopImgUrls(String shopImgUrls) {
        this.shopImgUrls = shopImgUrls;
    }

    public String getApplyInterventionImgUrls() {
        return applyInterventionImgUrls;
    }

    public void setApplyInterventionImgUrls(String applyInterventionImgUrls) {
        this.applyInterventionImgUrls = applyInterventionImgUrls;
    }

    public List<OrderRefundInterventionVO> getOrderRefundInterventionList() {
        return orderRefundInterventionList;
    }

    public void setOrderRefundInterventionList(List<OrderRefundInterventionVO> orderRefundInterventionList) {
        this.orderRefundInterventionList = orderRefundInterventionList;
    }

    public Integer getPlatformInterventionStatus() {
        return platformInterventionStatus;
    }

    public void setPlatformInterventionStatus(Integer platformInterventionStatus) {
        this.platformInterventionStatus = platformInterventionStatus;
    }

    public String getApplyInterventionReason() {
        return applyInterventionReason;
    }

    public void setApplyInterventionReason(String applyInterventionReason) {
        this.applyInterventionReason = applyInterventionReason;
    }

    public Integer getInterventionRefundType() {
        return interventionRefundType;
    }

    public void setInterventionRefundType(Integer interventionRefundType) {
        this.interventionRefundType = interventionRefundType;
    }

    public Long getAfterInterventionRefundAmount() {
        return afterInterventionRefundAmount;
    }

    public void setAfterInterventionRefundAmount(Long afterInterventionRefundAmount) {
        this.afterInterventionRefundAmount = afterInterventionRefundAmount;
    }

    public String getPlatformMessage() {
        return platformMessage;
    }

    public void setPlatformMessage(String platformMessage) {
        this.platformMessage = platformMessage;
    }

    public Date getApplyInterventionTime() {
        return applyInterventionTime;
    }

    public void setApplyInterventionTime(Date applyInterventionTime) {
        this.applyInterventionTime = applyInterventionTime;
    }


    public Date getInterventionFinishTime() {
        return interventionFinishTime;
    }

    public void setInterventionFinishTime(Date interventionFinishTime) {
        this.interventionFinishTime = interventionFinishTime;
    }
    public Long getAllinpayRefundPurchaseAmount() {
        return allinpayRefundPurchaseAmount;
    }

    public void setAllinpayRefundPurchaseAmount(Long allinpayRefundPurchaseAmount) {
        this.allinpayRefundPurchaseAmount = allinpayRefundPurchaseAmount;
    }

    public Long getRefundActualTotal() {
        return refundActualTotal;
    }

    public void setRefundActualTotal(Long refundActualTotal) {
        this.refundActualTotal = refundActualTotal;
    }

    public String getReturnGiveawayIds() {
        return returnGiveawayIds;
    }

    public void setReturnGiveawayIds(String returnGiveawayIds) {
        this.returnGiveawayIds = returnGiveawayIds;
    }

    public String getPayIds() {
        return payIds;
    }

    public void setPayIds(String payIds) {
        this.payIds = payIds;
    }

    public Integer getPreSaleType() {
        return preSaleType;
    }

    public void setPreSaleType(Integer preSaleType) {
        this.preSaleType = preSaleType;
    }

    public Long getItemPurchaseAmount() {
        return itemPurchaseAmount;
    }

    public void setItemPurchaseAmount(Long itemPurchaseAmount) {
        this.itemPurchaseAmount = itemPurchaseAmount;
    }

    public Long getFreightAmount() {
        return freightAmount;
    }

    public void setFreightAmount(Long freightAmount) {
        this.freightAmount = freightAmount;
    }

    public Integer getWaitPurchase() {
        return waitPurchase;
    }

    public void setWaitPurchase(Integer waitPurchase) {
        this.waitPurchase = waitPurchase;
    }

    public Date getSupplierTime() {
        return supplierTime;
    }

    public void setSupplierTime(Date supplierTime) {
        this.supplierTime = supplierTime;
    }

    public Long getPurPlatformRefundCommission() {
        return purPlatformRefundCommission;
    }

    public void setPurPlatformRefundCommission(Long purPlatformRefundCommission) {
        this.purPlatformRefundCommission = purPlatformRefundCommission;
    }

    public Long getPurchaseRefundAmount() {
        return purchaseRefundAmount;
    }

    public void setPurchaseRefundAmount(Long purchaseRefundAmount) {
        this.purchaseRefundAmount = purchaseRefundAmount;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public Integer getSupplierHandleStatus() {
        return supplierHandleStatus;
    }

    public void setSupplierHandleStatus(Integer supplierHandleStatus) {
        this.supplierHandleStatus = supplierHandleStatus;
    }

    public Long getRefundId() {
        return refundId;
    }

    public void setRefundId(Long refundId) {
        this.refundId = refundId;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Long getOrderItemId() {
        return orderItemId;
    }

    public void setOrderItemId(Long orderItemId) {
        this.orderItemId = orderItemId;
    }

    public Integer getRefundCount() {
        return refundCount;
    }

    public void setRefundCount(Integer refundCount) {
        this.refundCount = refundCount;
    }

    public Long getRefundAmount() {
        return refundAmount;
    }

    public void setRefundAmount(Long refundAmount) {
        this.refundAmount = refundAmount;
    }

    public Long getPlatformRefundAmount() {
        return platformRefundAmount;
    }

    public void setPlatformRefundAmount(Long platformRefundAmount) {
        this.platformRefundAmount = platformRefundAmount;
    }

    public Long getPlatformRefundCommission() {
        return platformRefundCommission;
    }

    public void setPlatformRefundCommission(Long platformRefundCommission) {
        this.platformRefundCommission = platformRefundCommission;
    }

    public Long getDistributionTotalAmount() {
        return distributionTotalAmount;
    }

    public void setDistributionTotalAmount(Long distributionTotalAmount) {
        this.distributionTotalAmount = distributionTotalAmount;
    }

    public Integer getRefundType() {
        return refundType;
    }

    public void setRefundType(Integer refundType) {
        this.refundType = refundType;
    }

    public Integer getApplyType() {
        return applyType;
    }

    public void setApplyType(Integer applyType) {
        this.applyType = applyType;
    }

    public Integer getIsReceived() {
        return isReceived;
    }

    public void setIsReceived(Integer isReceived) {
        this.isReceived = isReceived;
    }

    public Integer getCloseType() {
        return closeType;
    }

    public void setCloseType(Integer closeType) {
        this.closeType = closeType;
    }

    public Integer getReturnMoneySts() {
        return returnMoneySts;
    }

    public void setReturnMoneySts(Integer returnMoneySts) {
        this.returnMoneySts = returnMoneySts;
    }

    public Integer getBuyerReason() {
        return buyerReason;
    }

    public void setBuyerReason(Integer buyerReason) {
        this.buyerReason = buyerReason;
    }

    public String getBuyerDesc() {
        return buyerDesc;
    }

    public void setBuyerDesc(String buyerDesc) {
        this.buyerDesc = buyerDesc;
    }

    public String getBuyerMobile() {
        return buyerMobile;
    }

    public void setBuyerMobile(String buyerMobile) {
        this.buyerMobile = buyerMobile;
    }

    public String getImgUrls() {
        return imgUrls;
    }

    public void setImgUrls(String imgUrls) {
        this.imgUrls = imgUrls;
    }

    public Date getOverTime() {
        return overTime;
    }

    public void setOverTime(Date overTime) {
        this.overTime = overTime;
    }

    public String getRejectMessage() {
        return rejectMessage;
    }

    public void setRejectMessage(String rejectMessage) {
        this.rejectMessage = rejectMessage;
    }

    public String getSellerMsg() {
        return sellerMsg;
    }

    public void setSellerMsg(String sellerMsg) {
        this.sellerMsg = sellerMsg;
    }

    public Date getHandelTime() {
        return handelTime;
    }

    public void setHandelTime(Date handelTime) {
        this.handelTime = handelTime;
    }

    public Date getDeliveryTime() {
        return deliveryTime;
    }

    public void setDeliveryTime(Date deliveryTime) {
        this.deliveryTime = deliveryTime;
    }

    public Date getReceiveTime() {
        return receiveTime;
    }

    public void setReceiveTime(Date receiveTime) {
        this.receiveTime = receiveTime;
    }

    public Date getCloseTime() {
        return closeTime;
    }

    public void setCloseTime(Date closeTime) {
        this.closeTime = closeTime;
    }

    public Date getDecisionTime() {
        return decisionTime;
    }

    public void setDecisionTime(Date decisionTime) {
        this.decisionTime = decisionTime;
    }

    public Date getRefundTime() {
        return refundTime;
    }

    public void setRefundTime(Date refundTime) {
        this.refundTime = refundTime;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Long getActualTotal() {
        return actualTotal;
    }

    public void setActualTotal(Long actualTotal) {
        this.actualTotal = actualTotal;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Integer getRefundStatus() {
        return refundStatus;
    }

    public void setRefundStatus(Integer refundStatus) {
        this.refundStatus = refundStatus;
    }

    public String getShopName() {
        return shopName;
    }

    public void setShopName(String shopName) {
        this.shopName = shopName;
    }

    public List<RefundOrderItemVO> getOrderItems() {
        return orderItems;
    }

    public void setOrderItems(List<RefundOrderItemVO> orderItems) {
        this.orderItems = orderItems;
    }

    public Long getRefundScore() {
        return refundScore;
    }

    public void setRefundScore(Long refundScore) {
        this.refundScore = refundScore;
    }

    public String getBuyerReasonValue() {
        return buyerReasonValue;
    }

    public void setBuyerReasonValue(String buyerReasonValue) {
        this.buyerReasonValue = buyerReasonValue;
    }

    public Long getOrderScore() {
        return orderScore;
    }

    public void setOrderScore(Long orderScore) {
        this.orderScore = orderScore;
    }

    public OrderRefundAddrVO getOrderRefundAddr() {
        return orderRefundAddr;
    }

    public void setOrderRefundAddr(OrderRefundAddrVO orderRefundAddr) {
        this.orderRefundAddr = orderRefundAddr;
    }

    public Long getPayId() {
        return payId;
    }

    public void setPayId(Long payId) {
        this.payId = payId;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public Integer getUnSuccessGroupOrder() {
        return unSuccessGroupOrder;
    }

    public void setUnSuccessGroupOrder(Integer unSuccessGroupOrder) {
        this.unSuccessGroupOrder = unSuccessGroupOrder;
    }

    public Long getSupplierFreightAmount() {
        return supplierFreightAmount;
    }

    public void setSupplierFreightAmount(Long supplierFreightAmount) {
        this.supplierFreightAmount = supplierFreightAmount;
    }

    public Long getPlatformFreeFreightAmount() {
        return platformFreeFreightAmount;
    }

    public void setPlatformFreeFreightAmount(Long platformFreeFreightAmount) {
        this.platformFreeFreightAmount = platformFreeFreightAmount;
    }

    public Integer getPaySysType() {
        return paySysType;
    }

    public void setPaySysType(Integer paySysType) {
        this.paySysType = paySysType;
    }

    public Boolean isLastOrder() {
        return lastOrder;
    }

    public void setLastOrder(Boolean lastOrder) {
        this.lastOrder = lastOrder;
    }

    public Boolean getLastOrder() {
        return lastOrder;
    }

    public String getShopSellerMsg() {
        return shopSellerMsg;
    }

    public void setShopSellerMsg(String shopSellerMsg) {
        this.shopSellerMsg = shopSellerMsg;
    }

    @Override
    public String toString() {
        return "OrderRefundVO{" +
                "refundId=" + refundId +
                ", paySysType=" + paySysType +
                ", shopId=" + shopId +
                ", userId=" + userId +
                ", orderId=" + orderId +
                ", orderItemId=" + orderItemId +
                ", refundCount=" + refundCount +
                ", refundScore=" + refundScore +
                ", refundAmount=" + refundAmount +
                ", allinpayRefundPurchaseAmount=" + allinpayRefundPurchaseAmount +
                ", platformRefundAmount=" + platformRefundAmount +
                ", platformRefundCommission=" + platformRefundCommission +
                ", distributionTotalAmount=" + distributionTotalAmount +
                ", refundType=" + refundType +
                ", applyType=" + applyType +
                ", isReceived=" + isReceived +
                ", closeType=" + closeType +
                ", returnMoneySts=" + returnMoneySts +
                ", buyerReason=" + buyerReason +
                ", buyerReasonValue='" + buyerReasonValue + '\'' +
                ", buyerDesc='" + buyerDesc + '\'' +
                ", buyerMobile='" + buyerMobile + '\'' +
                ", imgUrls='" + imgUrls + '\'' +
                ", shopImgUrls='" + shopImgUrls + '\'' +
                ", overTime=" + overTime +
                ", rejectMessage='" + rejectMessage + '\'' +
                ", sellerMsg='" + sellerMsg + '\'' +
                ", handelTime=" + handelTime +
                ", deliveryTime=" + deliveryTime +
                ", receiveTime=" + receiveTime +
                ", closeTime=" + closeTime +
                ", supplierTime=" + supplierTime +
                ", decisionTime=" + decisionTime +
                ", refundTime=" + refundTime +
                ", payTime=" + payTime +
                ", actualTotal=" + actualTotal +
                ", orderScore=" + orderScore +
                ", orderStatus=" + orderStatus +
                ", refundStatus=" + refundStatus +
                ", shopName='" + shopName + '\'' +
                ", payId=" + payId +
                ", payIds='" + payIds + '\'' +
                ", payType=" + payType +
                ", orderItems=" + orderItems +
                ", orderRefundAddr=" + orderRefundAddr +
                ", unSuccessGroupOrder=" + unSuccessGroupOrder +
                ", supplierId=" + supplierId +
                ", supplierHandleStatus=" + supplierHandleStatus +
                ", purchaseRefundAmount=" + purchaseRefundAmount +
                ", purPlatformRefundCommission=" + purPlatformRefundCommission +
                ", freightAmount=" + freightAmount +
                ", supplierFreightAmount=" + supplierFreightAmount +
                ", waitPurchase=" + waitPurchase +
                ", itemPurchaseAmount=" + itemPurchaseAmount +
                ", returnGiveawayIds='" + returnGiveawayIds + '\'' +
                ", refundActualTotal=" + refundActualTotal +
                ", platformFreeFreightAmount=" + platformFreeFreightAmount +
                ", preSaleType=" + preSaleType +
                ", lastOrder=" + lastOrder +
                ", shopSellerMsg='" + shopSellerMsg + '\'' +
                ", platformInterventionStatus=" + platformInterventionStatus +
                ", applyInterventionReason='" + applyInterventionReason + '\'' +
                ", applyInterventionImgUrls='" + applyInterventionImgUrls + '\'' +
                ", interventionRefundType=" + interventionRefundType +
                ", afterInterventionRefundAmount=" + afterInterventionRefundAmount +
                ", platformMessage='" + platformMessage + '\'' +
                ", applyInterventionTime=" + applyInterventionTime +
                ", interventionEndTime=" + interventionEndTime +
                ", platformProcessingEndTime=" + platformProcessingEndTime +
                ", interventionFinishTime=" + interventionFinishTime +
                ", orderRefundInterventionList=" + orderRefundInterventionList +
                ", canApplyRefund=" + canApplyRefund +
                '}';
    }
}
