package com.ssj.service.conch.schoolmaster.util;

import com.alibaba.fastjson.JSONArray;
import com.ssj.framework.core.util.PropertiesUtil;
import com.ssj.service.kmt.dto.KnowledgeBaseDto;
import com.ssj.service.kmt.dto.exercise.QuestionSubjectAttribute;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Constant {
    /**
     * 作业批改超时时间，30分钟
     */
    public static final int HOME_WORK_OUTTIME = 30;

    /**
     * 难题解答超时时间，20分钟
     */
    public static final int PROBLEM_OUTTIME = 20;

    /**
     * tb_lib_manager中校长的类别
     */
    public static final int SCHOOL_MASTER_TYPE = 6;

    /**
     * tb_lib_manager中在馆老师的类别
     */
    public static final int TEACHER_TYPE = 2;

    /**
     * tb_lib_manager一对一的老师类别
     */
    public static final int KMT_121_TEACHER_TYPE = 7;  

    
    /**
     * tb_lib_manager中线上老师，和kmt 的老师
     */
    public static final int KMT_122_TEACHER_TYPE = 8;

    /**
     * tb_lib_manager小课老师的type
     */
    public static final int GROUP_TEACHER_TYPE = 9;

    /**
     * tb_lib_manager机构老师的type
     */
    public static final int ORG_TEACHER_TYPE = 10;
    /**
     * tb_lib_manager校区群管理员的type
     */
    public static final int CORRECT_MANAGER_TYPE = 11;
    /**
     * tb_lib_manager超级管理员的type
     */
    public static final int CORRECT_SUPER_MANAGER_TYPE = 12;
    /**
     * tb_lib_manager匹配知识点老师的type
     */
    public static final int CORRECT_KNOW_TYPE = 13;
    /**
     * 质检员
     */
    public static final int CORRECT_CHECKER = 14;

    /**
     * 质检员
     */
    public static final int SELF_CORRECT_TYPE = 15;
    /**
     * 作业批改
     */
    public static final int TEACHER_TASK_HOMEWORK = 1;

    /**
     * 难题反馈
     */
    public static final int TEACHER_TASK_RPOBLEM = 2;

    /**
     * 作业批改
     */
    public static final int TEACHER_TASK_WORKFEEDBACK = 3;

    /**
     * 服务列表
     */
    public static final Map<String, String>  SERVICE_MAP = new HashMap<String, String>();
    /**
     * 录入
     */
    public static final String   CMB_DF_STATUS_I                         = "I";
    /**
     * 成功
     */
    public static final String   CMB_DF_STATUS_S                         = "S";
    /**
     * 失败
     */
    public static final String   CMB_DF_STATUS_F                         = "F";

    /**
     * 正在获取状态
     */
    public static final String   CMB_DF_STATUS_C                         = "C";
    
    /**
     * 录入
     */
    public static final String   WITHDRAWAL_STATUS_INIT                  = "INIT";
    /**
     * 重新
     */
    public static final String   WITHDRAWAL_STATUS_REINIT                = "REINIT";
    /**
     * 错误
     */
    public static final String   WITHDRAWAL_STATUS_ERROR                 = "ERROR";
    /**
     * 成功
     */
    public static final String   WITHDRAWAL_STATUS_SUCCESS               = "SUCCESS";
    /**
     * 失败
     */
    public static final String   WITHDRAWAL_STATUS_FAIL                  = "FAIL";
    
    /**
     * 注册老师
     */
    public static final String   REGISTER_TEACHER                  = "注册老师";
    
    /**
     * 资深老师
     */
    public static final String	SENIOR_TEACHER               = "资深老师";
    /**
     * 明星老师
     */
    public static final String   STAR_TEACHER                  = "明星老师";
    /**
     * 学霸老师
     */
    public static final String   SUPER_TEACHER                  = "学霸老师";

    /**
     * 小课老师
     */
    public static final String   GROUP_TEACHER                  = "小课老师";

    public static final Map<String, String> ZYB_CARD_TYPE      = new HashMap<String, String>();

    /**
     * 题目类型
     */
    public static final List<QuestionSubjectAttribute> QUESTION_TYPES = JSONArray.parseArray(PropertiesUtil.getValue("QUESTION_TYPES"), QuestionSubjectAttribute.class);

    /**
     * 难度级别
     */
    public static final List<KnowledgeBaseDto> DIFFICULTY_LEVELS = JSONArray.parseArray(PropertiesUtil.getValue("DIFFICULTY_LEVELS"), KnowledgeBaseDto.class);

    /**
     * 真题例题练习题
     */
    public static final List<KnowledgeBaseDto> REAL_EXAM_TYPE = JSONArray.parseArray(PropertiesUtil.getValue("REAL_EXAM_TYPE"), KnowledgeBaseDto.class);

    /**
     * 能力
     */
    public static final List<QuestionSubjectAttribute> TRAINING_SKILL =  JSONArray.parseArray(PropertiesUtil.getValue("TRAINING_SKILL"), QuestionSubjectAttribute.class);

    static {
        SERVICE_MAP.put("S003", "作业吧");
        SERVICE_MAP.put("S010", "一对一");

        ZYB_CARD_TYPE.put("C001", "年卡");
        ZYB_CARD_TYPE.put("C002", "半年卡");
        ZYB_CARD_TYPE.put("C003", "月卡");
        ZYB_CARD_TYPE.put("C004", "作业吧月卡");
        ZYB_CARD_TYPE.put("C005", "作业吧半年卡");
        ZYB_CARD_TYPE.put("C006", "作业吧年卡");
        ZYB_CARD_TYPE.put("C015", "季度卡");

    }

}
