package com.ywt.outpatient.domain.entity.center;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

@Entity
@Table(name = "order_payment")
public class OrderPayment {
    @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;

    /**
     * 支付渠道
     */
    @Column(name = "payment_channel", nullable = false)
    private Integer paymentChannel;

    /**
     * 以payment_status 枚举为准
     */
    @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;

    /**
     * 备注
     */
    private String remark;

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

    /**
     * 是否删除（标识物理删除）
     */
    @Column(name = "is_deleted", nullable = false)
    private Boolean isDeleted;

    @Column(name = "prepay_id")
    private String prepayId;


    @Column(name = "result_code")
    private String resultCode;

    @Column(name = "transaction_id")
    private String transactionId;


    @Column(name = "cash_fee")
    private Integer cashFee;

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

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

    /**
     * 标识是否删除
     */
    @Column(name = "deleted", nullable = false)
    private Boolean deleted;

    /**
     * 预约单号（预约成功后返回的）
     */
    @Column(name = "his_order_code")
    private String hisOrderCode;

    /**
     * HIS系统患者ID
     */
    @Column(name = "his_patient_id")
    private String hisPatientId;

    /**
     * 支付方式代码
     */
    @Column(name = "his_pay_mode_code")
    private String hisPayModeCode;

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

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

    /**
     * 医保报销
     */
    @Column(name = "reimbursement", nullable = false)
    private Integer reimbursement;

    @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 = "op_by")
    private String opBy;

    @Column(name = "internal_pay_no")
    private String internalPayNo;


    @Column(name = "alipay_trade_no")
    private String alipayTradeNo;
    @Column(name = "alipay_uid")
    private String alipayUid;

    public Integer getId() {
        return id;
    }

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

    public Integer getOrderId() {
        return orderId;
    }

    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;
    }

    public Integer getUserId() {
        return userId;
    }

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

    public Integer getPaymentChannel() {
        return paymentChannel;
    }

    public void setPaymentChannel(Integer paymentChannel) {
        this.paymentChannel = paymentChannel;
    }

    public Integer getPaymentStatus() {
        return paymentStatus;
    }

    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 setIsDeleted(boolean deleted) {
        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;
    }

    public String getAttach() {
        return 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;
    }

    public String getPrepayId() {
        return prepayId;
    }

    public void setPrepayId(String prepayId) {
        this.prepayId = prepayId;
    }

    public String getCallbackData() {
        return callbackData;
    }

    public void setCallbackData(String callbackData) {
        this.callbackData = callbackData;
    }

    public Boolean getDeleted() {
        return deleted;
    }

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

    public String getHisOrderCode() {
        return hisOrderCode;
    }

    public void setHisOrderCode(String hisOrderCode) {
        this.hisOrderCode = hisOrderCode;
    }

    public String getHisPatientId() {
        return hisPatientId;
    }

    public void setHisPatientId(String hisPatientId) {
        this.hisPatientId = hisPatientId;
    }

    public String getHisPayModeCode() {
        return hisPayModeCode;
    }

    public void setHisPayModeCode(String hisPayModeCode) {
        this.hisPayModeCode = hisPayModeCode;
    }

    public Integer getTerminal() {
        return terminal;
    }

    public void setTerminal(Integer terminal) {
        this.terminal = terminal;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public Integer getReimbursement() {
        return reimbursement;
    }

    public void setReimbursement(Integer reimbursement) {
        this.reimbursement = reimbursement;
    }

    public String getInsureKey() {
        return insureKey;
    }

    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 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;
    }

    public String getAlipayTradeNo() {
        return alipayTradeNo;
    }

    public void setAlipayTradeNo(String alipayTradeNo) {
        this.alipayTradeNo = alipayTradeNo;
    }

    public String getAlipayUid() {
        return alipayUid;
    }

    public void setAlipayUid(String alipayUid) {
        this.alipayUid = alipayUid;
    }
}
