package com.qmth.themis.common.enums;

/**
 * @Description: 自定义异常消息枚举
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2019/10/11
 */
public enum ExceptionResultEnum {
    /**
     * 考生端错误
     */
    NOT_FOUND_EXAM_RECORD(500, 500020, "未找到考试记录"),

    NOT_FOUND_EXAM_STUDENT(500, 500021, "未找到考生"),

    //    EXAM_ALREADY_FINISHED(500,500022,"该考试已结束"),

    EXAM_ID_NOT_EQUALY(500, 500023, "考试记录的学生Id和当前登录用户不一致"),

    QR_CODE_EXPIRE(500, 500024, "二维码已过期"),

    ORG_ID_OR_EXAM_ID_NOT_CHOOSE(500, 500025, "机构id或考试id必须有一个"),

    STUDENT_NOT_ALLOW_LOGIN(500, 500026, "该学生正在考试，不能登录"),

    //    EXAM_STATUS_NOT_NULL(500,500027,"考试状态不能为空"),

    EXAM_STATUS_NOT_ALLOW_IP(500, 500028, "考生IP不被允许"),

    EXAM_LEFT_COUNT_IS_ZERO(500, 500029, "没有剩余考试次数"),

    NOT_FOUND_EXAM_ACTIVITY(500, 500030, "未找到考试场次"),

    NOT_ALLOW_MAX_START_TIME(500, 500031, "没有到允许开考的时间"),

    MAX_START_TIME_FINISHED(500, 500032, "允许开考的时间已结束"),

    NOT_FOUND_EXAM_COURSE(500, 500033, "未找到考试科目"),

    EXAM_COURSE_OR_EXAM_PAPER_NOT_BIND(500, 500034, "考试科目未绑定试卷"),

    NOT_FOUND_EXAM_PAPER(500, 500035, "未找到试卷"),

    CLIENT_NET_OFFLINE(500, 500036, "客户端网络离线"),

    CLIENT_CAMERA_OFFLINE(500, 500037, "客户端摄像头离线"),

    CLIENT_SCREEN_OFFLINE(500, 500038, "客户端屏幕离线"),

    MOBILE_FIRST_OFFLINE(500, 500039, "移动端第一机位离线"),

    MOBILE_SECOND_OFFLINE(500, 500040, "移动端第二机位离线"),

    NOT_FOUND_PAPER_OBJECTIVE_ANSWER(500, 500041, "未找到试卷客观题答案"),

    NOT_FOUND_QUESTION_OBJECTIVE_ANSWER(500, 500042, "未找到小题客观题答案"),

    FORCE_FINISH(500, 500043, "已超过集中统一收卷时间"),

    EXAM_RECORD_UNFINISHED(500, 500044, "当前考试未结束，不允许开始新考试的候考"),

    /**
     * 系统预置
     */
    UNKONW_ERROR(500, 504, "未知错误:请联系管理员"),

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

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

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

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

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

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

    /**
     * 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不能为空"),

    VERSION_IS_NULL(400, 400051, "版本号不能为空"),

    ORG_NAME_IS_NULL(400, 400052, "机构名称不能为空"),

    /**
     * 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无效"),

    SOURCE_INVALID(401, 401009, "source无效"),

    RECORD_ID_INVALID(401, 401010, "recordId无效"),

    NO_SESSION(401, 401011, "请先登录"),

    AUTH_INFO_ERROR(401, 401012, "系统授权信息已过期，请联系系统管理员激活!"),

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

    /**
     * 500
     */

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

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

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

    ORG_ENABLE(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, "考试结束类型错误"),

    EXAM_STUDENT_ENABLE(500, 500019, "考生已停用"),

    EXAM_STATUS_UPDATE_ERROR(500, 5000020, "考试状态更新失败"),

    EXAM_STATUS_ERROR(500, 5000021, "考试状态错误"),

    EXAM_ENABLE(500, 500022, "考试已停用"),

    EXAM_STATUS_ALREADY_UPDATE(500, 5000023, "考试状态已被修改"),

    EXAM_FINISH(500, 5000024, "考试已结束"),

    REPEAT_CONNECT_ERROR(500, 5000025, "不允许重复连接"),

    EXAM_ACTIVITY_ENABLE(500, 500026, "考试场次已停用");

    private int statusCode;

    private int code;

    private String message;

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

    public int getStatusCode() {
        return statusCode;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}