package com.jay.monitor.data.core.enums;

/**
 * 公共枚举定义
 *
 * @author : liukx
 * @date : 2019/10/26 - 11:56
 */
public enum CommonErrors implements EnumService {

    COMMON_PARAM_ERROR("COMMON.PARAM.ERROR", "参数[%s]错误");

    private final String code;
    private final String message;

    CommonErrors(final String statusCode, final String reasonPhrase) {
        this.code = statusCode;
        this.message = reasonPhrase;
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public String toString() {
        return "{\"success\":false,\"errorCode\":\"" + code + "\",\"message\":\"" + message + "\"}";
    }
}
