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.math.BigDecimal;
import java.util.Date;

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

  /**
   * 主键
   */
  @Id
  private Integer id;

  /**
   * 订单id
   */
  @Column(name = "order_id", nullable = false)
  private Integer orderId;

  /**
   * 订单号
   */
  @Column(name = "order_no", nullable = false)
  private String orderNo;

  /**
   * 支付流水号
   */
  @Column(name = "payment_no", nullable = false)
  private String paymentNo;

  /**
   * 用户id
   */
  @Column(name = "user_id", nullable = false)
  private Integer userId;

  /**
   * 支付渠道（0-微信，1-支付宝）
   */
  @Column(name = "payment_channel", nullable = false)
  private Integer paymentChannel;

  /**
   * 支付状态（0-待支付,1-支付处理中，2-支付成功，3-支付失败）
   */
  @Column(name = "payment_status", nullable = false)
  private Integer paymentStatus;

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

  /**
   * 订单金额  
   */
  @Column(name = "order_amount", nullable = false)
  private BigDecimal orderAmount;

  /**
   * 实际支付金额
   */
  @Column(name = "payment_amount", nullable = false)
  private BigDecimal paymentAmount;

  /**
   * 支付结果备注 
   */
  @Column(name = "remark")
  private String remark;

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

  @Column(name = "is_deleted", nullable = false)
  private Boolean isDeleted;

  /**
   * 支付结果
   */
  @Column(name = "result_code")
  private String resultCode;

  /**
   * 交易流水号
   */
  @Column(name = "transaction_id")
  private String transactionId;

  /**
   * 金额
   */
  @Column(name = "cash_fee")
  private Integer cashFee;

  /**
   * 微信支付attach
   */
  @Column(name = "attach")
  private String attach;

  /**
   * 银行卡类型
   */
  @Column(name = "bank_type")
  private String bankType;

  /**
   * 时间
   */
  @Column(name = "time_end")
  private String timeEnd;

  /**
   * 错误码
   */
  @Column(name = "err_code")
  private String errCode;

  /**
   * 错误信息
   */
  @Column(name = "err_code_des")
  private String errCodeDes;

  /**
   * 微信支付prepay_id
   */
  @Column(name = "prepay_id")
  private String prepayId;

  /**
   * 回调数据
   */
  @Column(name = "callback_data")
  private String callbackData;

  @Column(name = "deleted", nullable = false)
  private Integer deleted = 0;

  /**
   * HIS订单编码
   */
  @Column(name = "his_order_code")
  private String hisOrderCode;

  /**
   * 门诊ID
   */
  @Column(name = "his_patient_id")
  private String hisPatientId;

  /**
   * HIS支付编码
   */
  @Column(name = "his_pay_mode_code")
  private String hisPayModeCode;

  /**
   * 支付终端
   */
  @Column(name = "terminal")
  private Integer terminal;

  /**
   * 社交账户open id
   */
  @Column(name = "open_id")
  private String openId = "";

  /**
   * 医保KEY
   */
  @Column(name = "insure_key")
  private String insureKey;

  /**
   * 医保业务类型
   */
  @Column(name = "insure_biz_type")
  private String insureBizType;

  /**
   * 医保类型
   */
  @Column(name = "insure_treatment_type")
  private String insureTreatmentType;

  /**
   * 医保费别
   */
  @Column(name = "insure_fee_type")
  private String insureFeeType;

  /**
   * 医保报销金额
   */
  @Column(name = "reimbursement")
  private Integer reimbursement;

  /**
   * 由谁操作
   */
  @Column(name = "op_by")
  private String opBy;

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

  /**
   * POS机系统检索号
   */
  @Column(name = "pos_refer_no")
  private String posReferNo;

  /**
   * POS机授权号
   */
  @Column(name = "pos_auth_no")
  private String posAuthNo;

  /**
   * POS机返回码
   */
  @Column(name = "pos_rsp_code")
  private String posRspCode;

  /**
   * POS机交易卡号
   */
  @Column(name = "pos_card_no")
  private String posCardNo;

  /**
   * POS机交易时间
   */
  @Column(name = "pos_trans_time")
  private String posTransTime;

  /**
   * POS机交易日期
   */
  @Column(name = "pos_trans_date")
  private String posTransDate;

  /**
   * POS机终端ID
   */
  @Column(name = "pos_terminal_id")
  private String posTerminalId;

  /**
   * POS机终端流水号
   */
  @Column(name = "pos_terminal_trace_no")
  private String posTerminalTraceNo;

  /**
   * 主键
   */
  public Integer getId() {
    return id;
  }

  /**
   * 主键
   */
  public void setId(Integer id) {
    this.id = id;
  }

  /**
   * 订单id
   */
  public Integer getOrderId() {
    return orderId;
  }

  /**
   * 订单id
   */
  public void setOrderId(Integer orderId) {
    this.orderId = orderId;
  }

  /**
   * 订单号
   */
  public String getOrderNo() {
    return orderNo;
  }

  /**
   * 订单号
   */
  public void setOrderNo(String orderNo) {
    this.orderNo = orderNo;
  }

  /**
   * 支付流水号
   */
  public String getPaymentNo() {
    return paymentNo;
  }

  /**
   * 支付流水号
   */
  public void setPaymentNo(String paymentNo) {
    this.paymentNo = paymentNo;
  }

  /**
   * 用户id
   */
  public Integer getUserId() {
    return userId;
  }

  /**
   * 用户id
   */
  public void setUserId(Integer userId) {
    this.userId = userId;
  }

  /**
   * 支付渠道（0-微信，1-支付宝）
   */
  public Integer getPaymentChannel() {
    return paymentChannel;
  }

  /**
   * 支付渠道（0-微信，1-支付宝）
   */
  public void setPaymentChannel(Integer paymentChannel) {
    this.paymentChannel = paymentChannel;
  }

  /**
   * 支付状态（0-待支付,1-支付处理中，2-支付成功，3-支付失败）
   */
  public Integer getPaymentStatus() {
    return paymentStatus;
  }

  /**
   * 支付状态（0-待支付,1-支付处理中，2-支付成功，3-支付失败）
   */
  public void setPaymentStatus(Integer paymentStatus) {
    this.paymentStatus = paymentStatus;
  }

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

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

  /**
   * 订单金额  
   */
  public BigDecimal getOrderAmount() {
    return orderAmount;
  }

  /**
   * 订单金额  
   */
  public void setOrderAmount(BigDecimal orderAmount) {
    this.orderAmount = orderAmount;
  }

  /**
   * 实际支付金额
   */
  public BigDecimal getPaymentAmount() {
    return paymentAmount;
  }

  /**
   * 实际支付金额
   */
  public void setPaymentAmount(BigDecimal paymentAmount) {
    this.paymentAmount = paymentAmount;
  }

  /**
   * 支付结果备注 
   */
  public String getRemark() {
    return remark;
  }

  /**
   * 支付结果备注 
   */
  public void setRemark(String remark) {
    this.remark = remark;
  }

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

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

  public Boolean isDeleted() {
    return isDeleted;
  }

  public void setDeleted(Boolean deleted) {
    this.isDeleted = deleted;
  }

  /**
   * 支付结果
   */
  public String getResultCode() {
    return resultCode;
  }

  /**
   * 支付结果
   */
  public void setResultCode(String resultCode) {
    this.resultCode = resultCode;
  }

  /**
   * 交易流水号
   */
  public String getTransactionId() {
    return transactionId;
  }

  /**
   * 交易流水号
   */
  public void setTransactionId(String transactionId) {
    this.transactionId = transactionId;
  }

  /**
   * 金额
   */
  public Integer getCashFee() {
    return cashFee;
  }

  /**
   * 金额
   */
  public void setCashFee(Integer cashFee) {
    this.cashFee = cashFee;
  }

  /**
   * 微信支付attach
   */
  public String getAttach() {
    return attach;
  }

  /**
   * 微信支付attach
   */
  public void setAttach(String attach) {
    this.attach = attach;
  }

  /**
   * 银行卡类型
   */
  public String getBankType() {
    return bankType;
  }

  /**
   * 银行卡类型
   */
  public void setBankType(String bankType) {
    this.bankType = bankType;
  }

  /**
   * 时间
   */
  public String getTimeEnd() {
    return timeEnd;
  }

  /**
   * 时间
   */
  public void setTimeEnd(String timeEnd) {
    this.timeEnd = timeEnd;
  }

  /**
   * 错误码
   */
  public String getErrCode() {
    return errCode;
  }

  /**
   * 错误码
   */
  public void setErrCode(String errCode) {
    this.errCode = errCode;
  }

  /**
   * 错误信息
   */
  public String getErrCodeDes() {
    return errCodeDes;
  }

  /**
   * 错误信息
   */
  public void setErrCodeDes(String errCodeDes) {
    this.errCodeDes = errCodeDes;
  }

  /**
   * 微信支付prepay_id
   */
  public String getPrepayId() {
    return prepayId;
  }

  /**
   * 微信支付prepay_id
   */
  public void setPrepayId(String prepayId) {
    this.prepayId = prepayId;
  }

  /**
   * 回调数据
   */
  public String getCallbackData() {
    return callbackData;
  }

  /**
   * 回调数据
   */
  public void setCallbackData(String callbackData) {
    this.callbackData = callbackData;
  }

  public Integer getDeleted() {
    return deleted;
  }

  public void setDeleted(Integer deleted) {
    this.deleted = deleted;
  }

  /**
   * HIS订单编码
   */
  public String getHisOrderCode() {
    return hisOrderCode;
  }

  /**
   * HIS订单编码
   */
  public void setHisOrderCode(String hisOrderCode) {
    this.hisOrderCode = hisOrderCode;
  }

  /**
   * 门诊ID
   */
  public String getHisPatientId() {
    return hisPatientId;
  }

  /**
   * 门诊ID
   */
  public void setHisPatientId(String hisPatientId) {
    this.hisPatientId = hisPatientId;
  }

  /**
   * HIS支付编码
   */
  public String getHisPayModeCode() {
    return hisPayModeCode;
  }

  /**
   * HIS支付编码
   */
  public void setHisPayModeCode(String hisPayModeCode) {
    this.hisPayModeCode = hisPayModeCode;
  }

  /**
   * 支付终端
   */
  public Integer getTerminal() {
    return terminal;
  }

  /**
   * 支付终端
   */
  public void setTerminal(Integer terminal) {
    this.terminal = terminal;
  }

  /**
   * 社交账户open id
   */
  public String getOpenId() {
    return openId;
  }

  /**
   * 社交账户open id
   */
  public void setOpenId(String openId) {
    this.openId = openId;
  }

  /**
   * 医保KEY
   */
  public String getInsureKey() {
    return insureKey;
  }

  /**
   * 医保KEY
   */
  public void setInsureKey(String insureKey) {
    this.insureKey = insureKey;
  }

  /**
   * 医保业务类型
   */
  public String getInsureBizType() {
    return insureBizType;
  }

  /**
   * 医保业务类型
   */
  public void setInsureBizType(String insureBizType) {
    this.insureBizType = insureBizType;
  }

  /**
   * 医保类型
   */
  public String getInsureTreatmentType() {
    return insureTreatmentType;
  }

  /**
   * 医保类型
   */
  public void setInsureTreatmentType(String insureTreatmentType) {
    this.insureTreatmentType = insureTreatmentType;
  }

  /**
   * 医保费别
   */
  public String getInsureFeeType() {
    return insureFeeType;
  }

  /**
   * 医保费别
   */
  public void setInsureFeeType(String insureFeeType) {
    this.insureFeeType = insureFeeType;
  }

  /**
   * 医保报销金额
   */
  public Integer getReimbursement() {
    return reimbursement;
  }

  /**
   * 医保报销金额
   */
  public void setReimbursement(Integer reimbursement) {
    this.reimbursement = reimbursement;
  }

  /**
   * 由谁操作
   */
  public String getOpBy() {
    return opBy;
  }

  /**
   * 由谁操作
   */
  public void setOpBy(String opBy) {
    this.opBy = opBy;
  }

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

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

  /**
   * POS机系统检索号
   */
  public String getPosReferNo() {
    return posReferNo;
  }

  /**
   * POS机系统检索号
   */
  public void setPosReferNo(String posReferNo) {
    this.posReferNo = posReferNo;
  }

  /**
   * POS机授权号
   */
  public String getPosAuthNo() {
    return posAuthNo;
  }

  /**
   * POS机授权号
   */
  public void setPosAuthNo(String posAuthNo) {
    this.posAuthNo = posAuthNo;
  }

  /**
   * POS机返回码
   */
  public String getPosRspCode() {
    return posRspCode;
  }

  /**
   * POS机返回码
   */
  public void setPosRspCode(String posRspCode) {
    this.posRspCode = posRspCode;
  }

  /**
   * POS机交易卡号
   */
  public String getPosCardNo() {
    return posCardNo;
  }

  /**
   * POS机交易卡号
   */
  public void setPosCardNo(String posCardNo) {
    this.posCardNo = posCardNo;
  }

  /**
   * POS机交易时间
   */
  public String getPosTransTime() {
    return posTransTime;
  }

  /**
   * POS机交易时间
   */
  public void setPosTransTime(String posTransTime) {
    this.posTransTime = posTransTime;
  }

  /**
   * POS机交易日期
   */
  public String getPosTransDate() {
    return posTransDate;
  }

  /**
   * POS机交易日期
   */
  public void setPosTransDate(String posTransDate) {
    this.posTransDate = posTransDate;
  }

  /**
   * POS机终端ID
   */
  public String getPosTerminalId() {
    return posTerminalId;
  }

  /**
   * POS机终端ID
   */
  public void setPosTerminalId(String posTerminalId) {
    this.posTerminalId = posTerminalId;
  }

  /**
   * POS机终端流水号
   */
  public String getPosTerminalTraceNo() {
    return posTerminalTraceNo;
  }

  /**
   * POS机终端流水号
   */
  public void setPosTerminalTraceNo(String posTerminalTraceNo) {
    this.posTerminalTraceNo = posTerminalTraceNo;
  }

  public String toString() {
    return "OrderPayment{id=" + id + 
      ", orderId=" + orderId + 
      ", orderNo=" + orderNo + 
      ", paymentNo=" + paymentNo + 
      ", userId=" + userId + 
      ", paymentChannel=" + paymentChannel + 
      ", paymentStatus=" + paymentStatus + 
      ", callbackTime=" + callbackTime + 
      ", orderAmount=" + orderAmount + 
      ", paymentAmount=" + paymentAmount + 
      ", remark=" + remark + 
      ", createTime=" + createTime + 
      ", deleted=" + deleted + 
      ", resultCode=" + resultCode + 
      ", transactionId=" + transactionId + 
      ", cashFee=" + cashFee + 
      ", attach=" + attach + 
      ", bankType=" + bankType + 
      ", timeEnd=" + timeEnd + 
      ", errCode=" + errCode + 
      ", errCodeDes=" + errCodeDes + 
      ", prepayId=" + prepayId + 
      ", callbackData=" + callbackData + 
      ", deleted=" + deleted + 
      ", hisOrderCode=" + hisOrderCode + 
      ", hisPatientId=" + hisPatientId + 
      ", hisPayModeCode=" + hisPayModeCode + 
      ", terminal=" + terminal + 
      ", openId=" + openId + 
      ", insureKey=" + insureKey + 
      ", insureBizType=" + insureBizType + 
      ", insureTreatmentType=" + insureTreatmentType + 
      ", insureFeeType=" + insureFeeType + 
      ", reimbursement=" + reimbursement + 
      ", opBy=" + opBy + 
      ", internalPayNo=" + internalPayNo + 
      ", posReferNo=" + posReferNo + 
      ", posAuthNo=" + posAuthNo + 
      ", posRspCode=" + posRspCode + 
      ", posCardNo=" + posCardNo + 
      ", posTransTime=" + posTransTime + 
      ", posTransDate=" + posTransDate + 
      ", posTerminalId=" + posTerminalId + 
      ", posTerminalTraceNo=" + posTerminalTraceNo + 
      "}";
  }
}