package com.sptg.common.core.beans;

import lombok.Getter;

/**
 * title: ResultEnum
 * package: com.sptg.common.core.beans
 * description: 返回值枚举
 *
 *
 */
@Getter
public enum ResultEnum implements ResultBean.BaseResultEnum {

    /**
     * 请求成功
     */
    SUCCESS("200","success"),

    /**
     * 参数异常
     */
    PARAMETER_ANOMALY("400","请求参数有误"),

    /**
     * 禁止访问
     */
    FORBIDDEN("403","没权限"),

    /**
     * 认证失败
     */
    UNAUTHORIZED("401","未登陆或登录超时"),

    /**
     * 找不到处理程序
     */
    NOT_FIND("404","资源不存在"),

    /**
     * 请求超时
     */
    REQUEST_TIME_OUT("408","请求超时"),

    /**
     * 服务器异常
     */
    ERROR("500","服务器异常"),

    /**
     * 授权登录失败
     */
    OAUTH_FAIL("500","授权登录失败，请联系平台管理员"),


    /**
     * 请求失败
     */
    FAILURE("402", "失败");

    /**
     * 状态吗
     */
    private String code;

    /**
     * 消息
     */
    private String msg;

    ResultEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
