package com.gz.core.exception;

import com.gz.core.response.CustomResponsInterface;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author LiuChangLan
 * @description 自定义异常枚举
 * @since 2021/1/26 22:23
 */
@Getter
@AllArgsConstructor
public enum CustomExceptionEnum implements CustomResponsInterface {

    ACCOUNT_OR_PASSWORD_INCORRECT(1000, "用户名不存在或者密码不正确!"),
    ACCOUNT_DISABLE(1001, "用户已禁用"),
    LOGIN_TIMEOUT(1002, "登录已过期"),
    CAPTCHA_ERROR(1003, "验证码错误"),
    DICT_CODE_EXISTS(1004, "字典编码已存在，请更换"),
    File_NOT_EXISTS(1005, "请选择一个文件"),
    PASSWORD_NO_INCORRECT(1006, "密码不正确"),
    GENERATE_DH_ERROR(1007, "档号生成失败"),
    UPLOAD_ARCHIVE_FILE_TYPE_ERROR(1008, "档案附件暂只支持PDF、TIF"),
    ACCOUNT_NOT_ROLE(1009,"当前账号未设置权限，请联系管理员"),


    ORIGINAL_SCRIPT_NO_EXISTS(1009, "原件已被借阅"),
    REPEAT_BORROW(1010, "您提交已借阅该文档，请勿重复借阅"),


    ARCHIVE_DATA_NOT_EXISTS(1100, "归档数据不存在"),
    DEL_ORIGINAL_FILE_ERROR(1101, "删除原文件失败"),


    NO_ROLE(1200, "无权限");


    private final Integer code;
    private final String msg;
}
