SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for config
-- ----------------------------
DROP TABLE IF EXISTS `config`;
CREATE TABLE `config` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `code` varchar(50) NOT NULL DEFAULT '' COMMENT '配置代码',
  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '网站名称',
  `domain` varchar(100) NOT NULL DEFAULT '' COMMENT '网站域名',
  `icpno` varchar(100) NOT NULL DEFAULT '' COMMENT 'icp备案号',
  `logo` varchar(500) NOT NULL DEFAULT '' COMMENT '网站图标',
  `keywords` varchar(100) NOT NULL DEFAULT '' COMMENT '网站关键词',
  `description` varchar(500) NOT NULL DEFAULT '' COMMENT '网站描述',
  `serialkey` varchar(100) NOT NULL DEFAULT '' COMMENT '序列号',
  `copyright` varchar(100) DEFAULT '' COMMENT '版权所有',
  `isregist` tinyint(2) NOT NULL DEFAULT '0' COMMENT '开放注册:1是0否',
  `socketip` varchar(100) DEFAULT '' COMMENT 'websocket服务器地址',
  `socketport` int(10) NOT NULL DEFAULT '0' COMMENT 'websocket服务器端口',
  `xdomain` varchar(100) DEFAULT '' COMMENT '客户端接口地址',
  `xapikey` varchar(300) DEFAULT '' COMMENT '客户端接口密钥',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='系统配置参数';

-- ----------------------------
-- Records of config
-- ----------------------------
INSERT INTO `config` VALUES ('1', 'main', '鱼知凡课堂教学系统', 'http://yi.iefeel.com', '豫ICP备17013669号-1', '/upfiles/config/201705/03/67350c19c49754b53a4bce73c35a93d8_s.png', '', '', '', 'yi.iefeel.com', '1', '', '0', 'http://yi.iefeel.com', 'tY0ZWQBYfpkh6rR67K0d0rKlxytqhvCuLrN0Vz0dcPIZQD0CpMsqFPIt68sBNGSJ8iq4Rh2Yg7V3chd4x2GqcQnQ9lvTBTZfx1DF');

-- ----------------------------
-- Table structure for config_score
-- ----------------------------
DROP TABLE IF EXISTS `config_score`;
CREATE TABLE `config_score` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `ketangid` int(10) NOT NULL DEFAULT '0' COMMENT '课堂id',
  `teacherid` int(10) NOT NULL DEFAULT '0' COMMENT '教师id',
  `code` varchar(50) NOT NULL DEFAULT '' COMMENT '代号',
  `name` varchar(50) NOT NULL DEFAULT '' COMMENT '评分项',
  `weight` double NOT NULL DEFAULT '0' COMMENT '权重',
  `standard` varchar(100) NOT NULL DEFAULT '' COMMENT '评价标准',
  PRIMARY KEY (`id`),
  KEY `config_score_index_code` (`code`),
  KEY `config_score_index_ketangid` (`ketangid`),
  KEY `config_score_index_teacherid` (`teacherid`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='课堂成绩设定';

-- ----------------------------
-- Records of config_score
-- ----------------------------
INSERT INTO `config_score` VALUES ('1', '0', '0', 'sign', '课堂签到', '20', '签到成功即可得权重分数');
INSERT INTO `config_score` VALUES ('2', '0', '0', 'wenda', '课堂问答', '30', '回答问题正确即可得权重分数');
INSERT INTO `config_score` VALUES ('3', '0', '0', 'topic', '话题讨论', '20', '发表内容3次以上即可得权重分数');
INSERT INTO `config_score` VALUES ('4', '0', '0', 'space', '展示空间', '30', '提交成功可以得权重分数');

-- ----------------------------
-- Table structure for course
-- ----------------------------
DROP TABLE IF EXISTS `course`;
CREATE TABLE `course` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `userid` int(11) NOT NULL DEFAULT '0' COMMENT '用户id',
  `specialid` int(11) NOT NULL DEFAULT '0' COMMENT '专业id',
  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '课程名称',
  `spelling` varchar(500) NOT NULL DEFAULT '' COMMENT '拼音',
  `firstletter` varchar(10) NOT NULL DEFAULT 'Z' COMMENT '首字母',
  `sortid` int(11) NOT NULL DEFAULT '0' COMMENT '排序(升序)',
  `cometime` datetime DEFAULT NULL COMMENT '创建时间',
  `views` int(11) NOT NULL DEFAULT '0' COMMENT '浏览量',
  `missing` int(11) NOT NULL DEFAULT '0' COMMENT '是否被删除:1是0否',
  `logo` varchar(500) NOT NULL DEFAULT '' COMMENT '封面图',
  `resournum` int(11) NOT NULL DEFAULT '0' COMMENT '资源数量',
  `questinum` int(11) NOT NULL DEFAULT '0' COMMENT '题目数量',
  `schoolid` int(10) DEFAULT '0' COMMENT '学校id',
  `originid` varchar(50) DEFAULT '' COMMENT '导入的原始id',
  `isopen` tinyint(2) NOT NULL DEFAULT '0' COMMENT '是否对学生公开:1是,0否',
  `specialpath` varchar(200) DEFAULT '' COMMENT '专业节点路径',
  PRIMARY KEY (`id`),
  KEY `course_index_specialid` (`specialid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='课程';

-- ----------------------------
-- Records of course
-- ----------------------------

-- ----------------------------
-- Table structure for course_leader
-- ----------------------------
DROP TABLE IF EXISTS `course_leader`;
CREATE TABLE `course_leader` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `specialid` int(10) NOT NULL DEFAULT '0' COMMENT '专业id',
  `courseid` int(10) NOT NULL DEFAULT '0' COMMENT '课程id',
  `userid` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `leadertype` tinyint(2) NOT NULL DEFAULT '1' COMMENT '类型:1负责人,2普通成员',
  `username` varchar(50) DEFAULT '' COMMENT '用户名',
  `stdnumber` varchar(50) DEFAULT '' COMMENT '工号',
  `realname` varchar(100) DEFAULT '' COMMENT '姓名',
  `logo` varchar(500) DEFAULT '' COMMENT '头像',
  PRIMARY KEY (`id`),
  KEY `course_leader_index_courseid` (`courseid`),
  KEY `course_leader_index_userid` (`userid`),
  KEY `course_leader_index_leadertype` (`leadertype`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='课程团队成员';

-- ----------------------------
-- Records of course_leader
-- ----------------------------

-- ----------------------------
-- Table structure for course_tree
-- ----------------------------
DROP TABLE IF EXISTS `course_tree`;
CREATE TABLE `course_tree` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `userid` int(11) NOT NULL DEFAULT '0' COMMENT '用户id',
  `specialid` int(11) NOT NULL DEFAULT '0' COMMENT '专业id',
  `courseid` int(11) NOT NULL DEFAULT '0' COMMENT '课程id',
  `parentid` int(11) NOT NULL DEFAULT '0' COMMENT '父级id',
  `nodetype` tinyint(4) NOT NULL DEFAULT '0' COMMENT '类型:1章,2节,3知识点',
  `nodepath` varchar(200) NOT NULL DEFAULT '' COMMENT '节点路径',
  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '名称',
  `spelling` varchar(500) NOT NULL DEFAULT '' COMMENT '拼音',
  `firstletter` varchar(10) NOT NULL DEFAULT 'Z' COMMENT '首字母',
  `missing` int(11) NOT NULL DEFAULT '0' COMMENT '是否被删除:1是0否',
  `sortid` int(11) NOT NULL DEFAULT '0' COMMENT '排序(升序)',
  `cometime` datetime DEFAULT NULL COMMENT '创建时间',
  `resournum` int(11) NOT NULL DEFAULT '0' COMMENT '资源数量',
  `questinum` int(11) NOT NULL DEFAULT '0' COMMENT '题目数量',
  `schoolid` int(10) DEFAULT '0' COMMENT '学校id',
  `originid` varchar(50) DEFAULT '' COMMENT '导入的原始id',
  PRIMARY KEY (`id`),
  KEY `course_tree_index_specialid` (`specialid`),
  KEY `course_tree_index_courseid` (`courseid`),
  KEY `course_tree_index_parentid` (`parentid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='课程章节知识点';

-- ----------------------------
-- Records of course_tree
-- ----------------------------

-- ----------------------------
-- Table structure for friendlink
-- ----------------------------
DROP TABLE IF EXISTS `friendlink`;
CREATE TABLE `friendlink` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `userid` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '名称',
  `linkurl` varchar(200) NOT NULL DEFAULT '' COMMENT '链接地址',
  `logo` varchar(500) NOT NULL DEFAULT '' COMMENT '网站图标',
  `sortid` int(10) NOT NULL DEFAULT '0' COMMENT '排序,正序',
  `isseen` int(10) NOT NULL DEFAULT '0' COMMENT '显示方式:1文字,2图标',
  `color` varchar(50) NOT NULL DEFAULT '' COMMENT '颜色编码',
  `cometime` datetime DEFAULT NULL COMMENT '创建时间',
  `starttime` datetime DEFAULT NULL COMMENT '有效期起始',
  `stoptime` datetime DEFAULT NULL COMMENT '有效期截止',
  `missing` int(10) NOT NULL DEFAULT '0' COMMENT '是否被删除:1是0否',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='友情链接';

-- ----------------------------
-- Records of friendlink
-- ----------------------------

-- ----------------------------
-- Table structure for ketang
-- ----------------------------
DROP TABLE IF EXISTS `ketang`;
CREATE TABLE `ketang` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `specialid` int(10) NOT NULL DEFAULT '0' COMMENT '专业id',
  `courseid` int(10) NOT NULL DEFAULT '0' COMMENT '课程id',
  `treeid` int(10) NOT NULL DEFAULT '0' COMMENT '章节id',
  `userid` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `title` varchar(200) NOT NULL DEFAULT '' COMMENT '课堂标题',
  `starttime` datetime DEFAULT NULL COMMENT '开始时间',
  `stoptime` datetime DEFAULT NULL COMMENT '结束时间',
  `vfcode` varchar(10) NOT NULL DEFAULT '' COMMENT '课堂密码',
  `vfimage` varchar(500) NOT NULL DEFAULT '' COMMENT '课堂密码图片',
  `studentnum` int(10) NOT NULL DEFAULT '0' COMMENT '学习人数',
  `classids` varchar(500) NOT NULL DEFAULT '' COMMENT '班级id',
  `isended` tinyint(2) NOT NULL DEFAULT '0' COMMENT '是否已结束',
  `specialpath` varchar(200) DEFAULT '' COMMENT '专业节点路径',
  `classnames` varchar(1000) DEFAULT '' COMMENT '班级名称',
  `signcode` varchar(500) DEFAULT '' COMMENT '签到二维码',
  `kejian` varchar(500) DEFAULT '' COMMENT '课件',
  `kejian_ext` varchar(50) DEFAULT '' COMMENT '课件格式',
  `kejian_preview` varchar(500) DEFAULT '' COMMENT '课件预览图',
  `kejian_pages` int(10) DEFAULT '0' COMMENT '课件预览图数量',
  `username` varchar(50) DEFAULT '' COMMENT '用户名',
  `stdnumber` varchar(50) DEFAULT '' COMMENT '工号',
  `realname` varchar(100) DEFAULT '' COMMENT '姓名',
  `logo` varchar(500) DEFAULT '' COMMENT '头像',
  `isarchived` int(10) NOT NULL DEFAULT '0' COMMENT '是否已存档,大于0表示年份',
  `coursename` varchar(100) DEFAULT '' COMMENT '课程名称',
  `topicfree` tinyint(2) NOT NULL DEFAULT '0' COMMENT '允许学生发布话题,1是0否',
  PRIMARY KEY (`id`),
  KEY `ketang_index_courseid` (`courseid`),
  KEY `ketang_index_userid` (`userid`),
  KEY `ketang_index_specialid` (`specialid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='开课信息';

-- ----------------------------
-- Records of ketang
-- ----------------------------

-- ----------------------------
-- Table structure for ketang_answer
-- ----------------------------
DROP TABLE IF EXISTS `ketang_answer`;
CREATE TABLE `ketang_answer` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `ketangid` int(10) NOT NULL DEFAULT '0' COMMENT '课堂id',
  `userid` int(10) NOT NULL DEFAULT '0' COMMENT '学生id',
  `typeid` int(11) NOT NULL DEFAULT '0' COMMENT '题目类型',
  `specialid` int(11) NOT NULL DEFAULT '0' COMMENT '专业id',
  `courseid` int(11) NOT NULL DEFAULT '0' COMMENT '课程id',
  `stemid` int(10) NOT NULL DEFAULT '0' COMMENT '题干id',
  `points` double NOT NULL DEFAULT '0' COMMENT '题目得分',
  `isrushed` tinyint(2) NOT NULL DEFAULT '0' COMMENT '1抢答,2随机提问,3全员回答',
  `answer` mediumtext COMMENT '学生的答案',
  `cometime` datetime DEFAULT NULL COMMENT '创建时间',
  `username` varchar(50) DEFAULT '' COMMENT '用户名',
  `stdnumber` varchar(50) DEFAULT '' COMMENT '学号',
  `realname` varchar(50) DEFAULT '' COMMENT '姓名',
  `logo` varchar(500) DEFAULT '' COMMENT '头像',
  PRIMARY KEY (`id`),
  KEY `ketang_answer_index_ketangid` (`ketangid`),
  KEY `ketang_answer_index_userid` (`userid`),
  KEY `ketang_answer_index_typeid` (`typeid`),
  KEY `ketang_answer_index_courseid` (`courseid`),
  KEY `ketang_answer_index_stemid` (`stemid`),
  KEY `ketang_answer_index_isrushed` (`isrushed`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='学生的回答';

-- ----------------------------
-- Records of ketang_answer
-- ----------------------------

-- ----------------------------
-- Table structure for ketang_chatroom
-- ----------------------------
DROP TABLE IF EXISTS `ketang_chatroom`;
CREATE TABLE `ketang_chatroom` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `specialid` int(10) NOT NULL DEFAULT '0' COMMENT '专业id',
  `courseid` int(10) NOT NULL DEFAULT '0' COMMENT '课程id',
  `treeid` int(10) NOT NULL DEFAULT '0' COMMENT '章节id',
  `userid` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `ketangid` int(10) NOT NULL DEFAULT '0' COMMENT '课堂id',
  `saytime` datetime DEFAULT NULL COMMENT '发表时间',
  `classid` int(10) NOT NULL DEFAULT '0' COMMENT '班级id',
  `content` mediumtext COMMENT '发言内容',
  `specialpath` varchar(200) DEFAULT '' COMMENT '专业节点路径',
  `username` varchar(50) DEFAULT '' COMMENT '用户名',
  `stdnumber` varchar(50) DEFAULT '' COMMENT '学号',
  `realname` varchar(100) DEFAULT '' COMMENT '姓名',
  `logo` varchar(500) DEFAULT '' COMMENT '头像',
  PRIMARY KEY (`id`),
  KEY `ketang_chatroom_index_courseid` (`courseid`),
  KEY `ketang_chatroom_index_userid` (`userid`),
  KEY `ketang_chatroom_index_ketangid` (`ketangid`),
  KEY `ketang_chatroom_index_specialid` (`specialid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='课堂聊天';

-- ----------------------------
-- Records of ketang_chatroom
-- ----------------------------

-- ----------------------------
-- Table structure for ketang_discuss
-- ----------------------------
DROP TABLE IF EXISTS `ketang_discuss`;
CREATE TABLE `ketang_discuss` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `specialid` int(10) NOT NULL DEFAULT '0' COMMENT '专业id',
  `courseid` int(10) NOT NULL DEFAULT '0' COMMENT '课程id',
  `treeid` int(10) NOT NULL DEFAULT '0' COMMENT '章节id',
  `userid` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `ketangid` int(10) NOT NULL DEFAULT '0' COMMENT '课堂id',
  `topicid` int(10) NOT NULL DEFAULT '0' COMMENT '话题id',
  `saytime` datetime DEFAULT NULL COMMENT '发表时间',
  `classid` int(10) NOT NULL DEFAULT '0' COMMENT '班级id',
  `content` mediumtext COMMENT '发言内容',
  `specialpath` varchar(200) DEFAULT '' COMMENT '专业节点路径',
  `username` varchar(50) DEFAULT '' COMMENT '用户名',
  `stdnumber` varchar(50) DEFAULT '' COMMENT '学号',
  `realname` varchar(100) DEFAULT '' COMMENT '姓名',
  `logo` varchar(500) DEFAULT '' COMMENT '头像',
  `thumbsup` int(10) NOT NULL DEFAULT '0' COMMENT '点赞数量',
  `floorid` int(10) NOT NULL DEFAULT '0' COMMENT '楼层号',
  PRIMARY KEY (`id`),
  KEY `ketang_discuss_index_courseid` (`courseid`),
  KEY `ketang_discuss_index_userid` (`userid`),
  KEY `ketang_discuss_index_ketangid` (`ketangid`),
  KEY `ketang_discuss_index_specialid` (`specialid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='课堂讨论';

-- ----------------------------
-- Records of ketang_discuss
-- ----------------------------

-- ----------------------------
-- Table structure for ketang_docs
-- ----------------------------
DROP TABLE IF EXISTS `ketang_docs`;
CREATE TABLE `ketang_docs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `specialid` int(10) NOT NULL DEFAULT '0' COMMENT '专业id',
  `courseid` int(10) NOT NULL DEFAULT '0' COMMENT '课程id',
  `treeid` int(10) NOT NULL DEFAULT '0' COMMENT '知识点id',
  `userid` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `title` varchar(200) DEFAULT '' COMMENT '文件标题',
  `fileext` varchar(50) DEFAULT '' COMMENT '文件格式',
  `filepath` varchar(500) DEFAULT '' COMMENT '文件路径',
  `filesize` double DEFAULT '0' COMMENT '文件大小',
  `filemd5` varchar(50) DEFAULT '' COMMENT '文件Md5',
  `addtime` datetime DEFAULT NULL COMMENT '上传时间',
  `specialpath` varchar(200) DEFAULT '' COMMENT '专业节点路径',
  PRIMARY KEY (`id`),
  KEY `ketang_docs_index_specialid` (`specialid`),
  KEY `ketang_docs_index_courseid` (`courseid`),
  KEY `ketang_docs_index_treeid` (`treeid`),
  KEY `ketang_docs_index_userid` (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='上传的课件';

-- ----------------------------
-- Records of ketang_docs
-- ----------------------------

-- ----------------------------
-- Table structure for ketang_login
-- ----------------------------
DROP TABLE IF EXISTS `ketang_login`;
CREATE TABLE `ketang_login` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `userid` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `logintime` datetime DEFAULT NULL COMMENT '登录时间',
  `loginip` varchar(100) DEFAULT '' COMMENT '登录ip',
  `vfcode` varchar(10) DEFAULT '' COMMENT '验证码',
  `expiretime` datetime DEFAULT NULL COMMENT '失效时间',
  `result` int(10) NOT NULL DEFAULT '0' COMMENT '登录结果:0未使用,1成功,2失败',
  `vfimage` varchar(500) DEFAULT '' COMMENT '验证码图片',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='课堂登录码';

-- ----------------------------
-- Records of ketang_login
-- ----------------------------

-- ----------------------------
-- Table structure for ketang_option
-- ----------------------------
DROP TABLE IF EXISTS `ketang_option`;
CREATE TABLE `ketang_option` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `ketangid` int(11) NOT NULL DEFAULT '0' COMMENT '课堂id',
  `userid` int(11) NOT NULL DEFAULT '0' COMMENT '用户id',
  `typeid` int(11) NOT NULL DEFAULT '0' COMMENT '题目类型',
  `specialid` int(11) NOT NULL DEFAULT '0' COMMENT '专业id',
  `courseid` int(11) NOT NULL DEFAULT '0' COMMENT '课程id',
  `treeid` int(11) NOT NULL DEFAULT '0' COMMENT '知识树节点id,表resour_tree中的',
  `treepath` varchar(100) NOT NULL DEFAULT '' COMMENT '知识树节点路径',
  `stemid` int(11) NOT NULL DEFAULT '0' COMMENT '题干id',
  `code` varchar(10) NOT NULL DEFAULT '' COMMENT '选项字母编号',
  `isanswer` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否是答案:1是0否',
  `content` mediumtext COMMENT '选项内容',
  PRIMARY KEY (`id`),
  KEY `ketang_option_index_stemid` (`stemid`),
  KEY `ketang_option_index_specialid` (`specialid`),
  KEY `ketang_option_index_courseid` (`courseid`),
  KEY `ketang_option_index_treeid` (`treeid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='课堂题目选项';

-- ----------------------------
-- Records of ketang_option
-- ----------------------------

-- ----------------------------
-- Table structure for ketang_score
-- ----------------------------
DROP TABLE IF EXISTS `ketang_score`;
CREATE TABLE `ketang_score` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `ketangid` int(10) NOT NULL DEFAULT '0' COMMENT '课堂id',
  `studentid` int(10) NOT NULL DEFAULT '0' COMMENT '学生id',
  `stdrealname` varchar(50) NOT NULL DEFAULT '' COMMENT '学生姓名',
  `stdnumber` varchar(50) NOT NULL DEFAULT '' COMMENT '学生学号',
  `teacherid` int(10) NOT NULL DEFAULT '0' COMMENT '教师id',
  `score` double NOT NULL DEFAULT '0' COMMENT '总得分',
  `score_parts` varchar(100) DEFAULT '' COMMENT '各项得分json',
  `updtime` datetime DEFAULT NULL COMMENT '更新时间',
  PRIMARY KEY (`id`),
  KEY `ketang_score_index_ketangid` (`ketangid`),
  KEY `ketang_score_index_studentid` (`studentid`),
  KEY `ketang_score_index_teacherid` (`teacherid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='学生综合得分';

-- ----------------------------
-- Records of ketang_score
-- ----------------------------

-- ----------------------------
-- Table structure for ketang_signed
-- ----------------------------
DROP TABLE IF EXISTS `ketang_signed`;
CREATE TABLE `ketang_signed` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `specialid` int(10) NOT NULL DEFAULT '0' COMMENT '专业id',
  `courseid` int(10) NOT NULL DEFAULT '0' COMMENT '课程id',
  `userid` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `ketangid` int(10) NOT NULL DEFAULT '0' COMMENT '课堂id',
  `classid` int(10) NOT NULL DEFAULT '0' COMMENT '班级id',
  `signtime` datetime DEFAULT NULL COMMENT '签到时间',
  `specialpath` varchar(200) DEFAULT '' COMMENT '专业节点路径',
  `userip` varchar(100) NOT NULL DEFAULT '' COMMENT '用户ip',
  `useros` varchar(500) NOT NULL DEFAULT '' COMMENT '用户agent',
  `userequip` varchar(50) NOT NULL DEFAULT '' COMMENT '用户设备',
  `country` varchar(50) DEFAULT '' COMMENT 'ip国家',
  `area` varchar(50) DEFAULT '' COMMENT 'ip区域',
  `region` varchar(50) DEFAULT '' COMMENT 'ip省份',
  `city` varchar(50) DEFAULT '' COMMENT 'ip城市',
  `county` varchar(50) DEFAULT '' COMMENT 'ip县乡',
  `isp` varchar(50) DEFAULT '' COMMENT 'ip运营商',
  `username` varchar(50) DEFAULT '' COMMENT '用户名',
  `stdnumber` varchar(50) DEFAULT '' COMMENT '学号',
  `realname` varchar(100) DEFAULT '' COMMENT '姓名',
  `logo` varchar(500) DEFAULT '' COMMENT '头像',
  PRIMARY KEY (`id`),
  KEY `ketang_signed_index_specialid` (`specialid`),
  KEY `ketang_signed_index_courseid` (`courseid`),
  KEY `ketang_signed_index_userid` (`userid`),
  KEY `ketang_signed_index_ketangid` (`ketangid`),
  KEY `ketang_signed_index_classid` (`classid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='签到信息';

-- ----------------------------
-- Records of ketang_signed
-- ----------------------------

-- ----------------------------
-- Table structure for ketang_signed_more
-- ----------------------------
DROP TABLE IF EXISTS `ketang_signed_more`;
CREATE TABLE `ketang_signed_more` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `specialid` int(10) NOT NULL DEFAULT '0' COMMENT '专业id',
  `courseid` int(10) NOT NULL DEFAULT '0' COMMENT '课程id',
  `userid` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `ketangid` int(10) NOT NULL DEFAULT '0' COMMENT '课堂id',
  `classid` int(10) NOT NULL DEFAULT '0' COMMENT '班级id',
  `signtime` datetime DEFAULT NULL COMMENT '签到时间',
  `specialpath` varchar(200) DEFAULT '' COMMENT '专业节点路径',
  `userip` varchar(100) NOT NULL DEFAULT '' COMMENT '用户ip',
  `useros` varchar(500) NOT NULL DEFAULT '' COMMENT '用户agent',
  `userequip` varchar(50) NOT NULL DEFAULT '' COMMENT '用户设备',
  `country` varchar(50) DEFAULT '' COMMENT 'ip国家',
  `area` varchar(50) DEFAULT '' COMMENT 'ip区域',
  `region` varchar(50) DEFAULT '' COMMENT 'ip省份',
  `city` varchar(50) DEFAULT '' COMMENT 'ip城市',
  `county` varchar(50) DEFAULT '' COMMENT 'ip县乡',
  `isp` varchar(50) DEFAULT '' COMMENT 'ip运营商',
  `username` varchar(50) DEFAULT '' COMMENT '用户名',
  `stdnumber` varchar(50) DEFAULT '' COMMENT '学号',
  `realname` varchar(100) DEFAULT '' COMMENT '姓名',
  `logo` varchar(500) DEFAULT '' COMMENT '头像',
  PRIMARY KEY (`id`),
  KEY `ketang_signed_more_index_specialid` (`specialid`),
  KEY `ketang_signed_more_index_courseid` (`courseid`),
  KEY `ketang_signed_more_index_userid` (`userid`),
  KEY `ketang_signed_more_index_ketangid` (`ketangid`),
  KEY `ketang_signed_more_index_classid` (`classid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='签到信息_详细记录';

-- ----------------------------
-- Records of ketang_signed_more
-- ----------------------------

-- ----------------------------
-- Table structure for ketang_space
-- ----------------------------
DROP TABLE IF EXISTS `ketang_space`;
CREATE TABLE `ketang_space` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `specialid` int(10) NOT NULL DEFAULT '0' COMMENT '专业id',
  `courseid` int(10) NOT NULL DEFAULT '0' COMMENT '课程id',
  `treeid` int(10) NOT NULL DEFAULT '0' COMMENT '章节id',
  `userid` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `ketangid` int(10) NOT NULL DEFAULT '0' COMMENT '课堂id',
  `title` varchar(200) DEFAULT '' COMMENT '文件标题',
  `fileext` varchar(50) DEFAULT '' COMMENT '文件格式',
  `filepath` varchar(500) DEFAULT '' COMMENT '文件路径',
  `filesize` double DEFAULT '0' COMMENT '文件大小',
  `filemd5` varchar(50) DEFAULT '' COMMENT '文件Md5',
  `hits` int(10) DEFAULT '0' COMMENT '点击次数',
  `addtime` datetime DEFAULT NULL COMMENT '上传时间',
  `specialpath` varchar(200) DEFAULT '' COMMENT '专业节点路径',
  `username` varchar(50) DEFAULT '' COMMENT '用户名',
  `stdnumber` varchar(50) DEFAULT '' COMMENT '学号',
  `realname` varchar(100) DEFAULT '' COMMENT '姓名',
  `logo` varchar(500) DEFAULT '' COMMENT '头像',
  PRIMARY KEY (`id`),
  KEY `ketang_space_index_specialid` (`specialid`),
  KEY `ketang_space_index_courseid` (`courseid`),
  KEY `ketang_space_index_treeid` (`treeid`),
  KEY `ketang_space_index_userid` (`userid`),
  KEY `ketang_space_index_ketangid` (`ketangid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='展示空间';

-- ----------------------------
-- Records of ketang_space
-- ----------------------------

-- ----------------------------
-- Table structure for ketang_stem
-- ----------------------------
DROP TABLE IF EXISTS `ketang_stem`;
CREATE TABLE `ketang_stem` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `ketangid` int(11) NOT NULL DEFAULT '0' COMMENT '课堂id',
  `userid` int(11) NOT NULL DEFAULT '0' COMMENT '用户id',
  `typeid` int(11) NOT NULL DEFAULT '0' COMMENT '题目类型',
  `specialid` int(11) NOT NULL DEFAULT '0' COMMENT '专业id',
  `courseid` int(11) NOT NULL DEFAULT '0' COMMENT '课程id',
  `treeid` int(11) NOT NULL DEFAULT '0' COMMENT '知识树节点id,表resour_tree中的',
  `treepath` varchar(200) NOT NULL DEFAULT '' COMMENT '知识树节点路径',
  `optionnum` int(11) NOT NULL DEFAULT '0' COMMENT '选项个数',
  `points` double NOT NULL DEFAULT '10' COMMENT '分数',
  `levels` tinyint(4) NOT NULL DEFAULT '0' COMMENT '难度系数',
  `sortid` int(11) NOT NULL DEFAULT '0' COMMENT '排序,升序',
  `citednum` int(11) NOT NULL DEFAULT '0' COMMENT '被引用次数',
  `totaldone` int(10) DEFAULT '0' COMMENT '总使用次数',
  `cometime` datetime DEFAULT NULL COMMENT '创建时间',
  `content` mediumtext COMMENT '题干内容',
  `contenttext` mediumtext COMMENT '题干文本',
  `answer` mediumtext COMMENT '正确答案',
  `explains` mediumtext COMMENT '题目解析',
  `isrushed` tinyint(2) NOT NULL DEFAULT '0' COMMENT '1个人抢答,2随机提问,3全员回答',
  `studentid` int(10) NOT NULL DEFAULT '0' COMMENT '抢答或被提问学生id',
  `replynum` int(10) NOT NULL DEFAULT '0' COMMENT '已回答人数',
  `username` varchar(50) DEFAULT '' COMMENT '用户名',
  `stdnumber` varchar(50) DEFAULT '' COMMENT '工号',
  `realname` varchar(100) DEFAULT '' COMMENT '姓名',
  `logo` varchar(500) DEFAULT '' COMMENT '头像',
  PRIMARY KEY (`id`),
  KEY `ketang_stem_index_typeid` (`typeid`),
  KEY `ketang_stem_index_specialid` (`specialid`),
  KEY `ketang_stem_index_courseid` (`courseid`),
  KEY `ketang_stem_index_treeid` (`treeid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='课堂题目题干';

-- ----------------------------
-- Records of ketang_stem
-- ----------------------------

-- ----------------------------
-- Table structure for ketang_student
-- ----------------------------
DROP TABLE IF EXISTS `ketang_student`;
CREATE TABLE `ketang_student` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `specialid` int(10) NOT NULL DEFAULT '0' COMMENT '专业id',
  `courseid` int(10) NOT NULL DEFAULT '0' COMMENT '课程id',
  `treeid` int(10) NOT NULL DEFAULT '0' COMMENT '章节id',
  `userid` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `ketangid` int(10) NOT NULL DEFAULT '0' COMMENT '课堂id',
  `starttime` datetime DEFAULT NULL COMMENT '加入时间',
  `stoptime` datetime DEFAULT NULL COMMENT '离开时间',
  `classid` int(10) NOT NULL DEFAULT '0' COMMENT '班级id',
  `specialpath` varchar(200) DEFAULT '' COMMENT '专业节点路径',
  `username` varchar(50) DEFAULT '' COMMENT '用户名',
  `stdnumber` varchar(50) DEFAULT '' COMMENT '学号',
  `realname` varchar(100) DEFAULT '' COMMENT '姓名',
  `logo` varchar(500) DEFAULT '' COMMENT '头像',
  PRIMARY KEY (`id`),
  KEY `ketang_student_index_courseid` (`courseid`),
  KEY `ketang_student_index_userid` (`userid`),
  KEY `ketang_student_index_ketangid` (`ketangid`),
  KEY `ketang_student_index_specialid` (`specialid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='课堂学员';

-- ----------------------------
-- Records of ketang_student
-- ----------------------------

-- ----------------------------
-- Table structure for ketang_thumbsup
-- ----------------------------
DROP TABLE IF EXISTS `ketang_thumbsup`;
CREATE TABLE `ketang_thumbsup` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `courseid` int(10) NOT NULL DEFAULT '0' COMMENT '课程id',
  `userid` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `ketangid` int(10) NOT NULL DEFAULT '0' COMMENT '课堂id',
  `topicid` int(10) NOT NULL DEFAULT '0' COMMENT '话题id',
  `discussid` int(10) NOT NULL DEFAULT '0' COMMENT '讨论id',
  `saytime` datetime DEFAULT NULL COMMENT '点赞时间',
  `username` varchar(50) DEFAULT '' COMMENT '用户名',
  `stdnumber` varchar(50) DEFAULT '' COMMENT '学号',
  `realname` varchar(100) DEFAULT '' COMMENT '姓名',
  `logo` varchar(500) DEFAULT '' COMMENT '头像',
  PRIMARY KEY (`id`),
  KEY `ketang_thumbsup_index_courseid` (`courseid`),
  KEY `ketang_thumbsup_index_userid` (`userid`),
  KEY `ketang_thumbsup_index_ketangid` (`ketangid`),
  KEY `ketang_thumbsup_index_topicid` (`topicid`),
  KEY `ketang_thumbsup_index_discussid` (`discussid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='课堂讨论_点赞记录';

-- ----------------------------
-- Records of ketang_thumbsup
-- ----------------------------

-- ----------------------------
-- Table structure for ketang_topic
-- ----------------------------
DROP TABLE IF EXISTS `ketang_topic`;
CREATE TABLE `ketang_topic` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `specialid` int(10) NOT NULL DEFAULT '0' COMMENT '专业id',
  `courseid` int(10) NOT NULL DEFAULT '0' COMMENT '课程id',
  `treeid` int(10) NOT NULL DEFAULT '0' COMMENT '章节id',
  `userid` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `ketangid` int(10) NOT NULL DEFAULT '0' COMMENT '课堂id',
  `saytime` datetime DEFAULT NULL COMMENT '发表时间',
  `classid` int(10) NOT NULL DEFAULT '0' COMMENT '班级id',
  `title` varchar(100) DEFAULT NULL COMMENT '讨论话题',
  `specialpath` varchar(200) DEFAULT '' COMMENT '专业节点路径',
  `username` varchar(50) DEFAULT '' COMMENT '用户名',
  `stdnumber` varchar(50) DEFAULT '' COMMENT '学号',
  `realname` varchar(100) DEFAULT '' COMMENT '姓名',
  `logo` varchar(500) DEFAULT '' COMMENT '头像',
  `replynum` int(10) NOT NULL DEFAULT '0' COMMENT '回帖数量',
  `content` mediumtext COMMENT '讨论内容',
  `thumbsup` int(10) NOT NULL DEFAULT '0' COMMENT '点赞数量',
  `discussid` int(10) NOT NULL DEFAULT '0' COMMENT '第一个回复id',
  `issticked` int(10) NOT NULL DEFAULT '0' COMMENT '是否置顶:数字越大越靠前',
  PRIMARY KEY (`id`),
  KEY `ketang_topic_index_courseid` (`courseid`),
  KEY `ketang_topic_index_userid` (`userid`),
  KEY `ketang_topic_index_ketangid` (`ketangid`),
  KEY `ketang_topic_index_specialid` (`specialid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='课堂讨论_话题';

-- ----------------------------
-- Records of ketang_topic
-- ----------------------------

-- ----------------------------
-- Table structure for mediatype
-- ----------------------------
DROP TABLE IF EXISTS `mediatype`;
CREATE TABLE `mediatype` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(50) NOT NULL DEFAULT '' COMMENT '类型名称',
  `sortid` int(10) NOT NULL DEFAULT '0' COMMENT '排序(升序)',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COMMENT='系统内置媒体类型';

-- ----------------------------
-- Records of mediatype
-- ----------------------------
INSERT INTO `mediatype` VALUES ('1', '文本类', '10');
INSERT INTO `mediatype` VALUES ('2', '图形/图像类', '20');
INSERT INTO `mediatype` VALUES ('3', '音频类', '30');
INSERT INTO `mediatype` VALUES ('4', '视频类', '40');
INSERT INTO `mediatype` VALUES ('5', '动画类', '50');
INSERT INTO `mediatype` VALUES ('6', '虚拟仿真类', '55');
INSERT INTO `mediatype` VALUES ('7', '其他素材', '90');
INSERT INTO `mediatype` VALUES ('8', 'PPT演示文稿', '60');
INSERT INTO `mediatype` VALUES ('9', '网页课件', '70');
INSERT INTO `mediatype` VALUES ('10', '富媒体', '80');

-- ----------------------------
-- Table structure for notice
-- ----------------------------
DROP TABLE IF EXISTS `notice`;
CREATE TABLE `notice` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `userid` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `title` varchar(200) NOT NULL DEFAULT '' COMMENT '标题',
  `cometime` datetime DEFAULT NULL COMMENT '创建时间',
  `starttime` datetime DEFAULT NULL COMMENT '有效期起始',
  `stoptime` datetime DEFAULT NULL COMMENT '有效期截止',
  `linkurl` varchar(500) NOT NULL DEFAULT '' COMMENT '链接地址',
  `linktarget` varchar(20) NOT NULL DEFAULT '' COMMENT '链接是否新窗口打开',
  `views` int(10) NOT NULL DEFAULT '0' COMMENT '点击次数',
  `missing` int(10) NOT NULL DEFAULT '0' COMMENT '是否被删除:1是0否',
  `color` varchar(50) NOT NULL DEFAULT '' COMMENT '颜色编码',
  `forclass` varchar(500) DEFAULT '' COMMENT '适用班级:,1,2,3,...',
  `content` text COMMENT '公告内容',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='系统公告';

-- ----------------------------
-- Records of notice
-- ----------------------------

-- ----------------------------
-- Table structure for questi_type
-- ----------------------------
DROP TABLE IF EXISTS `questi_type`;
CREATE TABLE `questi_type` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(50) NOT NULL DEFAULT '' COMMENT '名称',
  `sortid` int(11) NOT NULL DEFAULT '0' COMMENT '排序,升序',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='题库题目类型';

-- ----------------------------
-- Records of questi_type
-- ----------------------------
INSERT INTO `questi_type` VALUES ('1', '单选', '10');
INSERT INTO `questi_type` VALUES ('2', '多选', '20');
INSERT INTO `questi_type` VALUES ('3', '判断', '30');
INSERT INTO `questi_type` VALUES ('4', '填空', '40');
INSERT INTO `questi_type` VALUES ('5', '简答', '50');

-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(50) NOT NULL DEFAULT '' COMMENT '角色名称',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='角色';

-- ----------------------------
-- Records of role
-- ----------------------------
INSERT INTO `role` VALUES ('1', '超管');
INSERT INTO `role` VALUES ('2', '校长');
INSERT INTO `role` VALUES ('3', '教师');
INSERT INTO `role` VALUES ('4', '学生');
INSERT INTO `role` VALUES ('5', '企业');
INSERT INTO `role` VALUES ('6', '社会学习者');

-- ----------------------------
-- Table structure for role_group
-- ----------------------------
DROP TABLE IF EXISTS `role_group`;
CREATE TABLE `role_group` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `roleid` int(10) NOT NULL DEFAULT '0' COMMENT '角色id',
  `name` varchar(50) NOT NULL DEFAULT '' COMMENT '用户组',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='用户组';

-- ----------------------------
-- Records of role_group
-- ----------------------------
INSERT INTO `role_group` VALUES ('1', '1', '超管');
INSERT INTO `role_group` VALUES ('2', '2', '校长');
INSERT INTO `role_group` VALUES ('3', '3', '教师');
INSERT INTO `role_group` VALUES ('4', '4', '学生');
INSERT INTO `role_group` VALUES ('5', '5', '企业');
INSERT INTO `role_group` VALUES ('6', '6', '社会学习者');
INSERT INTO `role_group` VALUES ('7', '3', '院系负责人');
INSERT INTO `role_group` VALUES ('8', '3', '专业负责人');
INSERT INTO `role_group` VALUES ('9', '3', '课程负责人');

-- ----------------------------
-- Table structure for schoolclass
-- ----------------------------
DROP TABLE IF EXISTS `schoolclass`;
CREATE TABLE `schoolclass` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `specialid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '专业id',
  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '班级名称',
  `code` varchar(50) DEFAULT '' COMMENT '班级代码',
  `studentnum` int(10) NOT NULL DEFAULT '0' COMMENT '学生人数',
  `grade` int(10) NOT NULL DEFAULT '0' COMMENT '年级',
  `cometime` datetime DEFAULT NULL COMMENT '创建时间',
  `specialpath` varchar(200) DEFAULT '' COMMENT '专业节点路径',
  `spelling` varchar(500) DEFAULT '' COMMENT '汉语拼音',
  `firstletter` varchar(10) DEFAULT 'Z' COMMENT '首字母',
  `isarchived` int(10) NOT NULL DEFAULT '0' COMMENT '是否已存档,大于0表示年份',
  PRIMARY KEY (`id`),
  KEY `schoolclass_index_specialid` (`specialid`),
  KEY `schoolclass_index_grade` (`grade`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='行政班级';

-- ----------------------------
-- Records of schoolclass
-- ----------------------------

-- ----------------------------
-- Table structure for specialty
-- ----------------------------
DROP TABLE IF EXISTS `specialty`;
CREATE TABLE `specialty` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `parentid` int(11) NOT NULL DEFAULT '0' COMMENT '父级id',
  `nodetype` tinyint(4) NOT NULL DEFAULT '0' COMMENT '类型:1院,2系,3专业',
  `nodepath` varchar(200) NOT NULL DEFAULT '' COMMENT '节点路径',
  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '名称',
  `spelling` varchar(500) NOT NULL DEFAULT '' COMMENT '拼音',
  `firstletter` varchar(10) NOT NULL DEFAULT 'Z' COMMENT '首字母',
  `sortid` int(11) NOT NULL DEFAULT '0' COMMENT '排序(升序)',
  `cometime` datetime DEFAULT NULL COMMENT '创建时间',
  `resournum` int(11) NOT NULL DEFAULT '0' COMMENT '资源数量',
  `questinum` int(11) NOT NULL DEFAULT '0' COMMENT '题目数量',
  `studentnum` int(10) NOT NULL DEFAULT '0' COMMENT '学生数量',
  `isseen` tinyint(2) NOT NULL DEFAULT '0' COMMENT '是否显示:1显示,0隐藏',
  `icveid` varchar(50) DEFAULT '' COMMENT 'icve原始id号',
  PRIMARY KEY (`id`),
  KEY `specialty_index_parentid` (`parentid`),
  KEY `specialty_index_isseen` (`isseen`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='专业';

-- ----------------------------
-- Records of specialty
-- ----------------------------

-- ----------------------------
-- Table structure for specialty_leader
-- ----------------------------
DROP TABLE IF EXISTS `specialty_leader`;
CREATE TABLE `specialty_leader` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `specialid` int(10) NOT NULL DEFAULT '0' COMMENT '专业id',
  `specialtype` int(10) NOT NULL DEFAULT '0' COMMENT '类型:1院,2系,3专业',
  `userid` int(10) NOT NULL DEFAULT '0' COMMENT '用户id',
  `leadertype` tinyint(2) NOT NULL DEFAULT '1' COMMENT '类型:1负责人,2普通成员',
  `username` varchar(50) DEFAULT '' COMMENT '用户名',
  `stdnumber` varchar(50) DEFAULT '' COMMENT '工号',
  `realname` varchar(100) DEFAULT '' COMMENT '姓名',
  `logo` varchar(500) DEFAULT '' COMMENT '头像',
  PRIMARY KEY (`id`),
  KEY `specialty_leader_index_specialid` (`specialid`),
  KEY `specialty_leader_index_userid` (`userid`),
  KEY `specialty_leader_index_leadertype` (`leadertype`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='专业团队成员';

-- ----------------------------
-- Records of specialty_leader
-- ----------------------------

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `roleid` int(11) NOT NULL DEFAULT '0' COMMENT '用户角色',
  `groupid` int(10) NOT NULL DEFAULT '0' COMMENT '用户组',
  `username` varchar(50) NOT NULL DEFAULT '' COMMENT '用户名',
  `stdnumber` varchar(50) DEFAULT '' COMMENT '学号',
  `password` varchar(100) NOT NULL DEFAULT '' COMMENT '密码',
  `salt` varchar(100) NOT NULL DEFAULT '' COMMENT '加密随机数',
  `male` tinyint(2) NOT NULL DEFAULT '0' COMMENT '性别:1男,2女,0保密',
  `realname` varchar(100) NOT NULL DEFAULT '' COMMENT '姓名',
  `nicename` varchar(100) NOT NULL DEFAULT '' COMMENT '昵称',
  `regtime` datetime DEFAULT NULL COMMENT '注册时间',
  `regip` varchar(100) NOT NULL DEFAULT '' COMMENT '注册ip',
  `logintime` datetime DEFAULT NULL COMMENT '登录时间',
  `loginip` varchar(100) NOT NULL DEFAULT '' COMMENT '登录ip',
  `logo` varchar(500) NOT NULL DEFAULT '' COMMENT '头像',
  `islocked` tinyint(2) NOT NULL DEFAULT '0' COMMENT '是否被锁定:1是0否',
  `email` varchar(100) NOT NULL DEFAULT '' COMMENT '电子邮箱',
  `cellphone` varchar(50) NOT NULL DEFAULT '' COMMENT '手机号',
  `isactive` tinyint(2) NOT NULL DEFAULT '0' COMMENT '是否已激活:1是0否',
  `missing` int(10) NOT NULL DEFAULT '0' COMMENT '是否被删除:1是0否',
  `token` varchar(100) NOT NULL DEFAULT '' COMMENT '激活令牌',
  `specialid` int(10) DEFAULT '0' COMMENT '专业id',
  `xzclassid` int(10) DEFAULT '0' COMMENT '行政班级id',
  `specialpath` varchar(200) DEFAULT '' COMMENT '专业节点路径',
  `grade` int(10) DEFAULT '0' COMMENT '年级',
  `leadspecialids` varchar(500) DEFAULT ',0,' COMMENT '负责的专业',
  `leadcourseids` varchar(500) DEFAULT ',0,' COMMENT '负责的课程',
  `isarchived` int(10) NOT NULL DEFAULT '0' COMMENT '是否已存档,大于0表示年份',
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_index_username` (`username`),
  UNIQUE KEY `user_index_stdnumber` (`stdnumber`),
  KEY `user_index_specialid` (`specialid`),
  KEY `user_index_xzclassid` (`xzclassid`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='用户信息';

-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('1', '1', '1', 'admin', 'admin', 'f0a5f849648352755fac4fc2907b47eb', '15faa097c65fb4ad5cb9df3d6675595f', '1', '管理员', '管理员', '2018-02-01 16:36:28', '192.168.1.150', '2018-06-06 11:15:48', '192.168.1.150', '/userfiles/face/201804/04/9519b1b317a7ded5b60161eeb01d2fef_s.jpg', '0', '', '', '1', '0', '', '0', '0', '', '0', ',0,', ',0,', '0');
