package com.ywt.mg.domain.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Table(name = "refund_log")
@Entity
public class RefundLog implements Serializable {
  private static final long serialVersionUID = 1L;

  @Id
  @Column(name = "id", insertable = false, nullable = false)
  private Integer id;

  /**
   * 内部支付编码
   */
  @Column(name = "internal_pay_no")
  private String internalPayNo;

  /**
   * 商户系统内部订单号
   */
  @Column(name = "refund_no")
  private String refundNo;

  /**
   * 退款金额，单位为分
   */
  @Column(name = "refund_fee")
  private Integer refundFee;

  /**
   * 微信订单号
   */
  @Column(name = "transaction_id")
  private String transactionId;

  /**
   * 商户订单号
   */
  @Column(name = "out_order_no")
  private String outOrderNo;

  /**
   * 退款原因
   */
  @Column(name = "refund_desc")
  private String refundDesc;

  /**
   * 微信返回结果
   */
  @Column(name = "response")
  private String response;

  /**
   * 状态，0退款未完成，1退款成功，2退款异常，3退款关闭
   */
  @Column(name = "refund_status")
  private Integer refundStatus;

  /**
   * 回调时间
   */
  @Column(name = "callback_time")
  private Date callbackTime;

  /**
   * 创建时间
   */
  @Column(name = "create_time")
  private Date createTime;

  /**
   * 回调grpc方法，结构：(/${package}.${service}/${method})
   */
  @Column(name = "callback_method")
  private String callbackMethod;

  /**
   * 退款操作人ID，对应mg_admin表
   */
  @Column(name = "admin_id")
  private Integer adminId = 0;

  /**
   * 退款方式，1-微信,2-支付宝,3-现金,5-pos机,0-UNKNOWN
   */
  @Column(name = "refund_stype")
  private Integer refundStype = 0;

  /**
   * 请求退款接口数据
   */
  @Column(name = "request_data")
  private String requestData;

  /**
   * 微信退款单号
   */
  @Column(name = "refund_id")
  private String refundId;

  /**
   * 微信退款成功时间
   */
  @Column(name = "success_time")
  private String successTime;

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  /**
   * 内部支付编码
   */
  public String getInternalPayNo() {
    return internalPayNo;
  }

  /**
   * 内部支付编码
   */
  public void setInternalPayNo(String internalPayNo) {
    this.internalPayNo = internalPayNo;
  }

  /**
   * 商户系统内部订单号
   */
  public String getRefundNo() {
    return refundNo;
  }

  /**
   * 商户系统内部订单号
   */
  public void setRefundNo(String refundNo) {
    this.refundNo = refundNo;
  }

  /**
   * 退款金额，单位为分
   */
  public Integer getRefundFee() {
    return refundFee;
  }

  /**
   * 退款金额，单位为分
   */
  public void setRefundFee(Integer refundFee) {
    this.refundFee = refundFee;
  }

  /**
   * 微信订单号
   */
  public String getTransactionId() {
    return transactionId;
  }

  /**
   * 微信订单号
   */
  public void setTransactionId(String transactionId) {
    this.transactionId = transactionId;
  }

  /**
   * 商户订单号
   */
  public String getOutOrderNo() {
    return outOrderNo;
  }

  /**
   * 商户订单号
   */
  public void setOutOrderNo(String outOrderNo) {
    this.outOrderNo = outOrderNo;
  }

  /**
   * 退款原因
   */
  public String getRefundDesc() {
    return refundDesc;
  }

  /**
   * 退款原因
   */
  public void setRefundDesc(String refundDesc) {
    this.refundDesc = refundDesc;
  }

  /**
   * 微信返回结果
   */
  public String getResponse() {
    return response;
  }

  /**
   * 微信返回结果
   */
  public void setResponse(String response) {
    this.response = response;
  }

  /**
   * 状态，0退款未完成，1退款成功，2退款异常，3退款关闭
   */
  public Integer getRefundStatus() {
    return refundStatus;
  }

  /**
   * 状态，0退款未完成，1退款成功，2退款异常，3退款关闭
   */
  public void setRefundStatus(Integer refundStatus) {
    this.refundStatus = refundStatus;
  }

  /**
   * 回调时间
   */
  public Date getCallbackTime() {
    return callbackTime;
  }

  /**
   * 回调时间
   */
  public void setCallbackTime(Date callbackTime) {
    this.callbackTime = callbackTime;
  }

  /**
   * 创建时间
   */
  public Date getCreateTime() {
    return createTime;
  }

  /**
   * 创建时间
   */
  public void setCreateTime(Date createTime) {
    this.createTime = createTime;
  }

  /**
   * 回调grpc方法，结构：(/${package}.${service}/${method})
   */
  public String getCallbackMethod() {
    return callbackMethod;
  }

  /**
   * 回调grpc方法，结构：(/${package}.${service}/${method})
   */
  public void setCallbackMethod(String callbackMethod) {
    this.callbackMethod = callbackMethod;
  }

  /**
   * 退款操作人ID，对应mg_admin表
   */
  public Integer getAdminId() {
    return adminId;
  }

  /**
   * 退款操作人ID，对应mg_admin表
   */
  public void setAdminId(Integer adminId) {
    this.adminId = adminId;
  }

  /**
   * 退款方式，1-微信,2-支付宝,3-现金,5-pos机,0-UNKNOWN
   */
  public Integer getRefundStype() {
    return refundStype;
  }

  /**
   * 退款方式，1-微信,2-支付宝,3-现金,5-pos机,0-UNKNOWN
   */
  public void setRefundStype(Integer refundStype) {
    this.refundStype = refundStype;
  }

  /**
   * 请求退款接口数据
   */
  public String getRequestData() {
    return requestData;
  }

  /**
   * 请求退款接口数据
   */
  public void setRequestData(String requestData) {
    this.requestData = requestData;
  }

  /**
   * 微信退款单号
   */
  public String getRefundId() {
    return refundId;
  }

  /**
   * 微信退款单号
   */
  public void setRefundId(String refundId) {
    this.refundId = refundId;
  }

  /**
   * 微信退款成功时间
   */
  public String getSuccessTime() {
    return successTime;
  }

  /**
   * 微信退款成功时间
   */
  public void setSuccessTime(String successTime) {
    this.successTime = successTime;
  }

  public String toString() {
    return "RefundLog{id=" + id + 
      ", internalPayNo=" + internalPayNo + 
      ", refundNo=" + refundNo + 
      ", refundFee=" + refundFee + 
      ", transactionId=" + transactionId + 
      ", outOrderNo=" + outOrderNo + 
      ", refundDesc=" + refundDesc + 
      ", response=" + response + 
      ", refundStatus=" + refundStatus + 
      ", callbackTime=" + callbackTime + 
      ", createTime=" + createTime + 
      ", callbackMethod=" + callbackMethod + 
      ", adminId=" + adminId + 
      ", refundStype=" + refundStype + 
      ", requestData=" + requestData + 
      ", refundId=" + refundId + 
      ", successTime=" + successTime + 
      "}";
  }
}