package com.kxs.common.core.constant.enums;

import lombok.Getter;
import lombok.RequiredArgsConstructor;

/**
 * 错误类型枚举
 *
 * @author 没秃顶的码农
 * @date 2023/10/29
 */
@Getter
@RequiredArgsConstructor
public enum ErrorTypeEnum {

	DECRYPT_ERROR(-1, "解密异常"), TOKEN_EXPIRED(-1, "令牌已过期"), TOKEN_EMPTY(-1, "令牌不存在"),
	CLIENT_NULL(-1, "客户端查询异常，请检查数据库链接"), ACCESS_DENIED(-1, "不允许范访问"), BAD_CREDENTIALS(-1, "用户名或密码错误"),
	CREDENTIALS_EXPIRED(-1, "用户凭证已过期"), USER_DISABLED(-1, "用户已失效"), ACCOUNT_DISABLED(-1, "用户帐号已过期"),
	ACCOUNT_LOCKED(-1, "用户帐号已被锁定"), USER_NOT_FOUND(-1, "未找到用户"), PHONE_NOT_FOUND(-1, "手机号不存在"),
	VERIFICATION_CODE_IS_ILLEGAL(-1, "验证码不合法"), VERIFICATION_CODE_IS_EMPTY(-1, "验证码不能为空"),
	UNAUTHORIZED_CLIENT(-1, "客户端不允许登陆"),

	SYS_PARAM_DELETE_SYSTEM(-1, "系统内置参数不能删除"), SYS_DICT_DELETE_SYSTEM(-1, "系统内置字典不允许删除"),
	SYS_MENU_DELETE_EXISTING(-1, "菜单存在下级节点 删除失败"), SYS_USER_USERNAME_EXISTING(-1, "用户名已存在"),
	SYS_USER_UPDATE_PASSWORD_ERROR(-1, "用户原密码错误"), SYS_DICT_UPDATE_SYSTEM(-1, "系统内置字典不能修改");

	private final int code;

	private final String description;

}
