package com.qmth.themis.common.enums;

/**
 * @Description: 自定义异常消息枚举
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2019/10/11
 */
public enum ExceptionResultEnum {
    /**
     * 系统预置
     */
    UNKONW_ERROR(500, 500001, "未知错误:请联系管理员"),

    EXCEPTION_ERROR(500, 500002, "系统异常:请联系管理员"),

    SUCCESS(200, 200, "成功"),

    ERROR(500, 500, "失败"),

    SQL_ERROR(500, 500003, "sql异常:"),

    INVOCATIONTARGET_ERROR(500, 500004, "反射异常:"),

    SERVICE_NOT_FOUND(500, 500004, "服务器错误"),

    /**
     * 400
     */
    USERNAME_ILLEGALITY(400, 400001, "用户名非法"),

    PARAMS_ILLEGALITY(400, 400002, "参数不能为空"),

    TASK_ID_IS_NULL(400, 400003, "任务id不能为空"),

    TASK_TYPE_IS_NULL(400, 400004, "任务类型不能为空"),

    TASK_TYPE_ERROR(400, 400005, "任务类型不匹配"),

    EXAM_ID_IS_NULL(400, 400006, "考试批次id不能为空"),

    RECORD_ID_IS_NULL(400, 400007, "考试记录id不能为空"),

    EXAM_INFO_IS_NULL(400, 400008, "考试批次信息不能为空"),

    EXAM_IS_NULL(400, 400009, "考试不能为空"),

    EXAM_STUDENT_ID_IS_NULL(400, 400010, "考生id不能为空"),

    EXAM_STUDENT_INFO_IS_NULL(400, 400011, "待修改的考生信息不能为空"),

    EXAM_DETAIL_ID_IS_NULL(400, 400012, "考试详情id不能为空"),

    STUDENT_ID_IS_NULL(400, 400013, "学生id不能为空"),

    ROOMCODE_IS_NULL(400, 400014, "考场代码不能为空"),

    STUDENT_INFO_IS_NULL(400, 400015, "待修改的学生信息不能为空"),

    LOGIN_NAME_IS_NULL(400, 400016, "用户名不能为空"),

    SHORT_CODE_IS_NULL(400, 400017, "考试口令不能为空"),

    PASSWORD_IS_NULL(400, 400018, "密码不能为空"),

    VERIFYCODE_IS_NULL(400, 400019, "验证码不能为空"),

    ORG_INFO_IS_NULL(400, 400020, "机构信息不能为空"),

    ORG_ID_IS_NULL(400, 400021, "机构id不能为空"),

    ORG_CODE_IS_NULL(400, 400022, "机构代码不能为空"),

    USER_INFO_IS_NULL(400, 400023, "用户信息不能为空"),

    MD5_IS_NULL(400, 400024, "附件MD5不能为空"),

    ATTACHMENT_IS_NULL(400, 400025, "请上传附件"),

    ATTACHMENT_TYPE_IS_NULL(400, 400026, "请上传文件类型"),

    FILE_TYPE_IS_NULL(400, 400027, "文件类型不能为空"),

    NAME_IS_NULL(400, 400028, "姓名不能为空"),

    ROLE_CODE_IS_NULL(400, 400029, "角色编码不能为空"),

    USER_ID_IS_NULL(400, 400030, "userId不能为空"),

    ENABLE_IS_NULL(400, 400031, "禁用/启用状态不能为空"),

    STUDENT_IS_NULL(400, 400032, "学生信息不能为空"),

    EXAM_CODE_IS_NULL(400, 400033, "考试批次编码不能为空"),

    EXAM_NAME_IS_NULL(400, 400034, "考试批次名称不能为空"),

    ATTACHMENT_ID_IS_NULL(400, 400035, "附件id不能为空"),

    SCENE_NUMBER_ID_IS_NULL(400, 400036, "场次id不能为空"),

    EXAM_SITE_IS_NULL(400, 400037, "考点不能为空"),

    EXAM_ROOM_ID_IS_NULL(400, 400038, "考场id不能为空"),

    COURSE_INFO_IS_NULL(400, 400039, "科目信息不能为空"),

    PAPER_INFO_IS_NULL(400, 400040, "试卷信息不能为空"),

    COURSE_ID_IS_NULL(400, 400041, "科目id不能为空"),

    COURSE_CODE_IS_NULL(400, 400042, "科目编码不能为空"),

    COURSE_NAME_IS_NULL(400, 400043, "科目名称不能为空"),

    EXCEL_NO(400, 400044, "excel没有数据"),

    FINISH_TYPE_IS_NULL(400, 400045, "考试结束类型不能为空"),

    BREACH_TYPE_IS_NULL(400, 400046, "违纪类型不能为空"),

    BREACH_DESC_IS_NULL(400, 400047, "违纪描述不能为空"),

    BREACH_STATUS_IS_NULL(400, 400048, "违纪状态不能为空"),

    MESSAGE_TYPE_IS_NULL(400, 400049, "消息类型不能为空"),

    EXAM_ACTIVITY_ID_IS_NULL(400, 400050, "考试场次id不能为空"),

    /**
     * 401
     */
    TOKEN_TIME_OUT(401, 401001, "token已过期"),

    TOKEN_INVALID(401, 401002, "token无效"),

    UN_AUTHORIZATION(401, 401003, "没有权限"),

    AUTHORIZATION_ERROR(401, 401004, "签名验证失败"),

    PLATFORM_INVALID(401, 401005, "platform无效"),

    DEVICE_ID_INVALID(401, 401006, "deviceId无效"),

    TIME_INVALID(401, 401007, "time无效"),

    AUTHORIZATION_INVALID(401, 401008, "authorization无效"),

    /**
     * 404
     */
    NOT_FOUND(404, 404001, "请求地址错误"),

    /**
     * 500
     */

    DOWNLOAD_FILE_TYPE_ERROR(500, 500001, "下载文件类型错误"),

    PASSWORD_ERROR(500, 500002, "密码不正确"),

    EXAM_ACTIVITY_NO(500, 500003, "考试场次信息不存在"),

    RECORD_NO(500, 500004, "考试记录不存在"),

    ORG_NO(500, 500005, "机构信息不存在"),

    TASK_NO(500, 500006, "任务不存在"),

    USER_NO(500, 500007, "用户或密码不正确"),

    EXAM_NO(500, 500008, "考试批次信息不存在"),

    ATTACHMENT_NO(500, 500009, "附件不存在"),

    STUDENT_NO(500, 500010, "学生不存在"),

    EXAM_STUDENT_NO(500, 500011, "考生不存在"),

    LOGIN_NO(500, 500012, "请先登录"),

    PASSWORD_ILLEGALITY(500, 500013, "密码非法"),

    USER_ENABLE(500, 500014, "用户已停用"),

    STUDENT_ENABLE(500, 500015, "学生已停用"),

    REQUEST_AWAIT(500, 500016, "请求等待:请稍后重试"),

    ATTACHMENT_ERROR(500, 500017,"上传文件失败"),

    FINISH_TYPE_ERROR(500, 500018, "考试结束类型错误"),;

    private int statusCode;
    private int code;
    private String message;

    ExceptionResultEnum(int statusCode, int code, String message) {
        this.statusCode = statusCode;
        this.code = code;
        this.message = message;
    }

    public int getStatusCode() {
        return statusCode;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
    }