package com.bonus.core.order.common.dto;

import cn.hutool.core.bean.BeanUtil;
import com.bonus.constant.LeConstants;
import com.fasterxml.jackson.databind.JsonNode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.math.BigDecimal;

@ApiModel("整单退单DTO")
public class OrderRefundDTO {
   @ApiModelProperty("是否为试算")
   private Integer ifTrial;
   @ApiModelProperty("订单id")
   private Long orderId;
   @ApiModelProperty("外部退单流水号（选填）")
   private String macRefundId;
   @ApiModelProperty("恢复库存 1是 2否")
   private Integer restoreInventory;
   @ApiModelProperty("退款原因")
   private String remark;
   @ApiModelProperty("扩展字段")
   private JsonNode extParam;
   /** @deprecated */
   @ApiModelProperty("设备订单id")
   @Deprecated
   private String macOrderId;
   /** @deprecated */
   @ApiModelProperty("本次退单金额（不传则全退）")
   @Deprecated
   private BigDecimal refundAmount;

   public OrderRefundParam convertToOrderRefundParam() {
      OrderRefundParam orderRefundParam = (OrderRefundParam)BeanUtil.copyProperties(this, OrderRefundParam.class, new String[0]);
      return orderRefundParam;
   }

   public OrderRefundDTO() {
      this.ifTrial = LeConstants.COMMON_NO;
   }

   public Integer getIfTrial() {
      return this.ifTrial;
   }

   public Long getOrderId() {
      return this.orderId;
   }

   public String getMacRefundId() {
      return this.macRefundId;
   }

   public Integer getRestoreInventory() {
      return this.restoreInventory;
   }

   public String getRemark() {
      return this.remark;
   }

   public JsonNode getExtParam() {
      return this.extParam;
   }

   /** @deprecated */
   @Deprecated
   public String getMacOrderId() {
      return this.macOrderId;
   }

   /** @deprecated */
   @Deprecated
   public BigDecimal getRefundAmount() {
      return this.refundAmount;
   }

   public void setIfTrial(final Integer ifTrial) {
      this.ifTrial = ifTrial;
   }

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

   public void setMacRefundId(final String macRefundId) {
      this.macRefundId = macRefundId;
   }

   public void setRestoreInventory(final Integer restoreInventory) {
      this.restoreInventory = restoreInventory;
   }

   public void setRemark(final String remark) {
      this.remark = remark;
   }

   public void setExtParam(final JsonNode extParam) {
      this.extParam = extParam;
   }

   /** @deprecated */
   @Deprecated
   public void setMacOrderId(final String macOrderId) {
      this.macOrderId = macOrderId;
   }

   /** @deprecated */
   @Deprecated
   public void setRefundAmount(final BigDecimal refundAmount) {
      this.refundAmount = refundAmount;
   }

}
