package com.jeesharp.business.modules.pay.tlinx.dto;

import java.io.Serializable;

/**
 * 浦发银行支付下单响应DTO
 * 
 * @author wangmeng
 * @since 2026-03-16
 */
public class TLinxPayOrderResponse implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    /**
     * 错误码
     */
    private String errcode;
    
    /**
     * 错误信息
     */
    private String msg;
    
    /**
     * 支付二维码地址
     */
    private String tradeQrcode;
    
    /**
     * 交易结果
     */
    private String tradeResult;
    
    /**
     * 订单号
     */
    private String ordNo;
    
    /**
     * 商户订单号
     */
    private String outNo;
    
    /**
     * 交易状态
     */
    private String tradeStatus;
    
    /**
     * 交易金额
     */
    private Integer tradeAmount;
    
    /**
     * 支付时间
     */
    private String payTime;
    
    // Getters and Setters
    
    public String getErrcode() {
        return errcode;
    }
    
    public void setErrcode(String errcode) {
        this.errcode = errcode;
    }
    
    public String getMsg() {
        return msg;
    }
    
    public void setMsg(String msg) {
        this.msg = msg;
    }
    
    public String getTradeQrcode() {
        return tradeQrcode;
    }
    
    public void setTradeQrcode(String tradeQrcode) {
        this.tradeQrcode = tradeQrcode;
    }
    
    public String getTradeResult() {
        return tradeResult;
    }
    
    public void setTradeResult(String tradeResult) {
        this.tradeResult = tradeResult;
    }
    
    public String getOrdNo() {
        return ordNo;
    }
    
    public void setOrdNo(String ordNo) {
        this.ordNo = ordNo;
    }
    
    public String getOutNo() {
        return outNo;
    }
    
    public void setOutNo(String outNo) {
        this.outNo = outNo;
    }
    
    public String getTradeStatus() {
        return tradeStatus;
    }
    
    public void setTradeStatus(String tradeStatus) {
        this.tradeStatus = tradeStatus;
    }
    
    public Integer getTradeAmount() {
        return tradeAmount;
    }
    
    public void setTradeAmount(Integer tradeAmount) {
        this.tradeAmount = tradeAmount;
    }
    
    public String getPayTime() {
        return payTime;
    }
    
    public void setPayTime(String payTime) {
        this.payTime = payTime;
    }
    
    /**
     * 判断是否支付成功
     * @return 是否成功
     */
    public boolean isSuccess() {
        return "0".equals(errcode);
    }
    
    @Override
    public String toString() {
        return "PuFaPayOrderResponse{" +
                "errcode='" + errcode + '\'' +
                ", msg='" + msg + '\'' +
                ", tradeQrcode='" + tradeQrcode + '\'' +
                ", tradeResult='" + tradeResult + '\'' +
                ", ordNo='" + ordNo + '\'' +
                ", outNo='" + outNo + '\'' +
                ", tradeStatus='" + tradeStatus + '\'' +
                ", tradeAmount=" + tradeAmount +
                ", payTime='" + payTime + '\'' +
                '}';
    }
}