package com.tzy.framework.pay.dto;

import com.alibaba.fastjson.JSONObject;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class RechargeUserInfoDto<T> implements Serializable {
    public RechargeUserInfoDto( String userName, String certificateNo){
        this.userName = userName;
        this.certificateNo = certificateNo;
    }
    //应用用户的会员编号
    private String loginNo;
    //是否验证用户实名
    private boolean checkUserAuth;
    //用户姓名
    private String userName;
    //身份证号
    private String certificateNo;
    //身份证正面
    private String idCardFront;
    //身份证反面
    private String idCardBack;
    //银行卡类型
    private String bankType;
    //银行卡号
    private String bankNo;
    //银行卡预留手机号
    private String bankPhone;
    //预绑卡关联号
    private String requestNo;
    //短信验证码
    private String phoneCode;
    //已绑定卡协议号
    private String agreementNo;

    //唤起类型
    private String callType;
    //支付参数:退款等使用
    private String payParam;

    private JSONObject payConfig;

    public T getPayConfigByClass( Class<T> clazz){
        return JSONObject.parseObject(payConfig.toJSONString(), clazz);
    }

}
