package com.ruoyi.web.controller.tool.testTool;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * 返回码枚举类
 *
 * @projectName: signBack
 * @package: com.sign.signback.enums
 * @className: ResultEnum
 * @author: DemoTao
 * @description: TODO
 * @date: 2023/8/20 15:02
 * @version: 1.0
 */
@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum ResultEnum {
    /**
     * 成功
     */
    SUCCESS(200, "成功"),
    UNKNOWN_ERROR(500, "未知错误"),
    MISSING_SERVLET_REQUEST_PARAMETER_ERROR(501, "缺少Servlet请求参数异常"),
    HTTP_MESSAGE_NOT_READABLE_ERROR(502, "参数请求体异常"),
    BIND_ERROR(503, "方法参数绑定错误(实体对象传参)"),
    METHOD_ARGUMENT_NOT_VALID_ERROR(504, "方法参数无效异常(实体对象请求体传参)"),
    BIND_IS_EXISTS_ERROR(505,"绑定的用户已经存在"),
    BIND_NOT_IS_EXISTS_ERROR(506,"用户未绑定"),

    NOT_LOGIN(403, "未登录"),
    NOT_TOKEN(403, "没有token"),
    INVALID_TOKEN(403, "无效token"),
    TOKEN_TIMEOUT(403, "token过期"),
    BE_REPLACED(405, "被挤下线"),
    KICK_OUT(403, "被踢下线"),


    CUSTOMIZE_ERROR(50001, "自定义异常");

    private Integer code;
    private String message;

}
