export const SYS_ADMIN_NAME = 'admin';

export const DEFAULT_LABEL = '--';

// 通用 -------------->
// 启用/禁用
export const ENABLE_TYPE = {
  false: '禁用',
  true: '启用',
};

// 基础 -------------->
// 角色
export const ROLE_TYPE = {
  SCANNER: '扫描员',
  SUBJECT_HEADER: '科组长',
  INSPECTOR: '复核员',
  MARKER: '评卷员',
  SCHOOL_ADMIN: '学校管理员',
  SCHOOL_VIEWER: '学校查询员',
  COLLEGE_ADMIN: '学院查询员',
};

export type RoleType = keyof typeof ROLE_TYPE;

// "SYS_ADMIN"|"SCANNER"|"SUBJECT_HEADER"|"INSPECTOR"|"MARKER"|"SCHOOL_VIEWER"|"SCHOOL_ADMIN"|"COLLEGE_ADMIN"|"SCAN_ADMIN"
export const ALL_ROLE_TYPE = {
  ...ROLE_TYPE,
  SYS_ADMIN: '系统管理员',
  SCAN_ADMIN: '扫描管理员',
};
export type AllRoleType = keyof typeof ALL_ROLE_TYPE;

// 批量新增角色
export const BATCH_ADD_ROLE = {
  SUBJECT_HEADER: '科组长',
  INSPECTOR: '复核员',
  MARKER: '评卷员',
};
export type BatchAddRole = keyof typeof BATCH_ADD_ROLE;

// 用户来源:"INTERNAL"|"EXTERNAL"
export const USER_SOURCE = {
  INTERNAL: '内部用户',
  EXTERNAL: '外部用户',
};
export type UserSource = keyof typeof USER_SOURCE;

// 考试类型:SCAN_IMAGE,MULTI_MEDIA
export const EXAM_TYPE = {
  SCAN_IMAGE: '扫描图片类型',
  MULTI_MEDIA: '多媒体类型',
};
export type ExamType = keyof typeof EXAM_TYPE;

// 评卷模式：普通、轨迹、不限
export const MARKING_MODE = {
  COMMON: '普通',
  TRACK: '轨迹',
  UNLIMITED: '不限',
};
export type MarkingMode = keyof typeof MARKING_MODE;

// 分数间隔：五分一段、十分一段
export const SCORE_INTERVAL = {
  FIVE: '五分一段',
  TEN: '十分一段',
};
export type ScoreInterval = keyof typeof SCORE_INTERVAL;

// 日志操作类型：查询、新增、更新、删除、导入、导出
export const LOG_TYPE = {
  QUERY: '查询',
  ADD: '新增',
  UPDATE: '更新',
  DELETE: '删除',
  IMPORT_FILE: '导入',
  EXPORT: '导出',
};
export type LogType = keyof typeof LOG_TYPE;

// 数据范围模式： 属于 不属于
export const DATA_SCOPE_MODE = {
  BELONG: '属于',
  NOT_BELONG: '不属于',
};
export type DataScopeMode = keyof typeof DATA_SCOPE_MODE;
// 数值范围模式： 大于 小于 等于
export const NUMBER_SCOPE_MODE = {
  GREATER_THAN: '大于',
  LESS_THAN: '小于',
  EQUAL: '等于',
};
export type NumberScopeMode = keyof typeof NUMBER_SCOPE_MODE;

// 选做题异常类型：未选做 多选做 少选做
export const OPTIONAL_EXCEPTION_TYPE = {
  UN_SELECTIVE: '未选做',
  MUTI_SELECTIVE: '多选做',
  LESS_SELECTIVE: '少选做',
};
export type OptionalExceptionType = keyof typeof OPTIONAL_EXCEPTION_TYPE;

// 选做题取分规则：最高分、最低分、最低分(去掉0分) scorePolicy
export const OPTIONAL_SCORE_POLICY = {
  2: '最高分',
  3: '最低分',
  4: '最低分(去掉0分)',
};
export type OptionalScorePolicy = keyof typeof OPTIONAL_SCORE_POLICY;

// 仲裁方式：按小题、按分组
export const ARBITRATION_TYPE = {
  QUESTION: '按小题仲裁',
  GROUP: '按分组仲裁',
};
export type ArbitrationType = keyof typeof ARBITRATION_TYPE;

// 合分策略: 平均分、最高分、最低分
export const COMBINE_SCORE_STRATEGY = {
  AVG_SCORE: '平均分',
  MAX_SCORE: '最高分',
  MIN_SCORE: '最低分',
};
export type CombineScoreStrategy = keyof typeof COMBINE_SCORE_STRATEGY;

// 三评规则：关闭、低差值高均分
export const THREE_EVALUATION_RULE = {
  CLOSE: '关闭',
  LOW_DIFF_HIGH_AVG: '低差值高均分',
};
export type ThreeEvaluationRule = keyof typeof THREE_EVALUATION_RULE;

// 考试状态
export const EXAM_STATUS = {
  START: '开始考试',
  FINISH: '已结束',
};
export type ExamStatus = keyof typeof EXAM_STATUS;

// 客观题题型 SINGLE,MULTIPLE,TRUE_OR_FALSE
export const OBJECTIVE_QUESTION_TYPE = {
  SINGLE: '单选题',
  MULTIPLE: '多选题',
  TRUE_OR_FALSE: '判断题',
};
export type ObjectiveQuestionType = keyof typeof OBJECTIVE_QUESTION_TYPE;

// 客观题判分策略 NONE,ALL,LEAK
export const OBJECTIVE_POLICY = {
  NONE: '无',
  ALL: '任选给分',
  LEAK: '漏选给分',
};
export type ObjectivePolicy = keyof typeof OBJECTIVE_POLICY;

// 问题卷状态：WAITING：待处理，BACK：已处理
export const ISSUE_PAPER_STATUS = {
  WAITING: '待处理',
  BACK: '已处理',
};
export type IssuePaperStatus = keyof typeof ISSUE_PAPER_STATUS;

// 分组状态 TRIAL:试评，FORMAL:正式，FINISH:已完成
export const GROUP_STATUS = {
  TRIAL: '试评',
  FORMAL: '正式',
  FINISH: '已完成',
};
export type GroupStatus = keyof typeof GROUP_STATUS;
