package com.jeequan.jeepay.core.model.applyment;

import com.jeequan.jeepay.core.constants.CS;
import lombok.Data;

/***
* 进件  商户应用支付参数一键配置结果
*
* @author zx
*
* @date 2023/9/19 9:41
*/
@Data
public class AutoConfigMchAppPayInfoResult {

    /** 一键配置的商户应用AppId **/
    private String appId;

    /** 商户号 **/
    private String mchNo;

    /** 配置结果  1-成功 0-失败 **/
    private Byte state;

    /** 失败信息 **/
    private String errMsg;

    /** 支付参数配置结果  1-成功 0-失败 **/
    private Byte paramsState;

    /** 费率配置结果  1-成功 0-失败 **/
    private Byte rateState;

    /** 通道配置结果  1-成功 0-失败 **/
    private Byte passageState;

    public AutoConfigMchAppPayInfoResult() {}

    public AutoConfigMchAppPayInfoResult(Byte state, Byte paramsState, Byte rateState, Byte passageState) {
        this.state = state;
        this.paramsState = paramsState;
        this.rateState = rateState;
        this.passageState = passageState;
    }

    public static AutoConfigMchAppPayInfoResult initAllStateFail() {
        return new AutoConfigMchAppPayInfoResult(CS.NO, CS.NO, CS.NO, CS.NO);
    }

}
