package com.jeequan.jeepay.core.model.params.yspay;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.jeequan.jeepay.core.annotate.ChannelMchId;
import com.jeequan.jeepay.core.constants.ChannelMchIdTypeEnum;
import com.jeequan.jeepay.core.model.params.IsvsubMchParams;
import lombok.Data;

/**
 * 银盛 特约商户参数定义
 *
 * @author xiaoyu
 * 
 * @date 2022/7/8 11:02
 */
@Data
public class YspayIsvsubMchParams extends IsvsubMchParams {

    /** 商户支付分账模式 **/
    public static final Byte PAY_TYPE_PAY = 1;
    public static final Byte PAY_TYPE_DIVISION = 2;

    /** 商户号 */
    @ChannelMchId(type = ChannelMchIdTypeEnum.MCH_NO)
    private String mercId;

    /** 商户支付模式 1-支付 2-分账 */
    private Byte payType;

    public String deSenData() {
        YspayIsvsubMchParams mchParams = this;

        return ((JSONObject) JSON.toJSON(mchParams)).toJSONString();
    }
}
