package com.ruoyi.app.omgpay;

public class OmgPaymentBusinessException extends RuntimeException {
    private final OmgPaymentErrorCode code;
    private final Long storeId;

    public OmgPaymentBusinessException(OmgPaymentErrorCode code) {
        this(code, null);
    }

    public OmgPaymentBusinessException(OmgPaymentErrorCode code, Long storeId) {
        super(code.name());
        this.code = code;
        this.storeId = storeId;
    }

    public OmgPaymentErrorCode getCode() {
        return code;
    }

    public String getMessageKey() {
        return code.getMessageKey();
    }

    public Long getStoreId() {
        return storeId;
    }
}
