package com.yami.shop.bean.app.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yami.shop.bean.model.OrderRefundRecord;
import com.yami.shop.common.serializer.json.ImgJsonSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

@Data
@ApiModel("退款订单对象")
public class ApiOrderRefundDto {

    @ApiModelProperty("记录ID")
    private Long refundId;

    @ApiModelProperty("订单编号")
    private String orderNumber;

    @ApiModelProperty("门店ID")
    private Long shopId;

    @ApiModelProperty("订单总金额")
    private BigDecimal orderAmount;

    @ApiModelProperty("退款编号")
    private String refundSn;

    @ApiModelProperty("第三方退款单号")
    private String orderPayNo;

    @ApiModelProperty("订单支付方式")
    private Integer payType;

    @ApiModelProperty("订单支付名称")
    private String payTypeName;

    @ApiModelProperty("退货数量")
    private Integer goodsNum;

    @ApiModelProperty("退款金额")
    private Double refundAmount = 0.0;

    @ApiModelProperty("退还积分")
    private Integer refundScore;

    @ApiModelProperty("申请类型")
    private Integer applyType;

    @ApiModelProperty("处理退款状态")
    private Integer returnMoneySts;

    @ApiModelProperty("申请时间")
    private Date applyTime;

    @ApiModelProperty("卖家处理时间")
    private Date handelTime;

    @ApiModelProperty("退款时间")
    private Date refundTime;

    @ApiModelProperty("更新时间")
    private Date updateTime;

    @ApiModelProperty("订单支付时间")
    private Date orderPayTime;

    @ApiModelProperty("用户退货发货时间")
    private Date shipTime;

    @ApiModelProperty("卖家收货时间")
    private Date receiveTime;

    @ApiModelProperty("撤销时间")
    private Date cancelTime;

    @ApiModelProperty("同意退款时间")
    private Date decisionTime;

    @ApiModelProperty("卖家拒绝时间")
    private Date rejectTime;

    @ApiModelProperty("文件凭证json")
    @JsonSerialize(using = ImgJsonSerializer.class)
    private String photoFiles;

    @ApiModelProperty("收货地址对象")
    private RefundDeliveryDto refundDelivery;

    @ApiModelProperty("拒绝原因")
    private String rejectMessage;

    @ApiModelProperty("申请原因")
    private String buyerReason;

    @ApiModelProperty("申请说明")
    private String buyerDesc;

    @ApiModelProperty("订单项")
    private List<RefundOrderItemDto> orderItems = new ArrayList<>();

    private List<OrderRefundRecord> records = new ArrayList<>();

    @ApiModelProperty("店铺名称")
    private String shopName;

    @ApiModelProperty("是否可以取消退款")
    private Boolean isCancel;

    @ApiModelProperty("是否已填写退货物流信息")
    private Boolean isReturnLogistics;

    @ApiModelProperty("卖家备注")
    private String sellerMsg;

    @ApiModelProperty("运费")
    private Double freightAmount;

    @ApiModelProperty("积分")
    private Long offsetPoints = 0L;

    @ApiModelProperty("商品总额")
    private Double goodsTotal = 0.0;

    @ApiModelProperty("退还的过期积分")
    private Long refundExpiredScore = 0L;

    @ApiModelProperty("配送类型")
    private Integer dvyType;

    @ApiModelProperty("会员优惠金额")
    private Double memberDiscountAmount = 0.0;

    @ApiModelProperty("会员优惠说明")
    private String memberDiscountDesc;
}
