package cn.iocoder.yudao.module.knowledge.constants;

import lombok.Getter;

/**
 * @author 叶圣暖
 */
@Getter
public enum CodeEnum {

    // 成功
    SUCCESS(200, "成功", "操作成功"),
    AUTH_FAIL(401, "无权限", "无权限"),
    //2500XX项目内通用错误码
    TEST(250001, "测试，请稍后再试", "测试"),
    //2500XX项目内通用错误码
    PARAMETER_VERIFICATION_FAILED(250000, "系统开小差了，请稍后再试", "参数校验失败"),
    SYSTEM_SEATA_GLOCK_ERROR(90001, "当前操作失败,可能有其他操作正在更新数据，请重新再试，如果一直失败请联系管理员", "系统异常"),
    SYSTEM_ERROR(250099, "系统开小差了，请稍后再试", "系统异常"),
    //档案管理
    TARCHIVES_SELECT_FAILED(121001, "查找失败", "查找失败"),
    TARCHIVES_SAVE_FAILED(121002, "新建文件夹||文件保存失败", "新建文件夹||文件保存失败"),
    TARCHIVES_RENAME_FAILED(121003, "文件夹||文件名称更改失败", "文件夹||文件名称更改失败"),
    TARCHIVES_DELETE_FAILED(121004, "文件||文件夹删除失败", "文件||文件夹删除失败"),
    TARCHIVES_RESTORE_ERROR(121005, "还原失败", "还原失败"),
    TARCHIVES_BINDELETE_FAILED(121006, "回收站删除失败", "回收站删除失败"),
    TARCHIVES_SORT_FAILED(121007, "排序失败", "排序失败"),
    TARCHIVES_FILEMOVE_FAILED(121008, "文件移动失败", "文件移动失败"),
    TARCHIVES_FILEEXPORT_FAILED(121009, "文件导出失败", "文件导出失败"),
    DB_FAILD(500, "数据重复", "数据异常");
    private final int code;
    private final String msg;
    private final String desc;

    CodeEnum(Integer code, String msg, String desc) {
        this.code = code;
        this.msg = msg;
        this.desc = desc;
    }

}
