-- phpMyAdmin SQL Dump
-- version 3.5.7
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2013 年 07 月 05 日 17:20
-- 服务器版本: 5.5.30
-- PHP 版本: 5.3.21

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- 数据库: `school`
--

-- --------------------------------------------------------

--
-- 表的结构 `ex_authorities`
--

CREATE TABLE IF NOT EXISTS `ex_authorities` (
  `code` varchar(32) CHARACTER SET gbk NOT NULL,
  `name` varchar(32) CHARACTER SET gbk NOT NULL,
  `url` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `parent_code` int(11) NOT NULL,
  `menu_flag` int(11) NOT NULL DEFAULT '0',
  `alias` varchar(32) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  UNIQUE KEY `code` (`code`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `ex_authorities`
--

INSERT INTO `ex_authorities` (`code`, `name`, `url`, `parent_code`, `menu_flag`, `alias`) VALUES
('1', '首页', '#', 0, 1, 'home'),
('2', '在线考试', '', 0, 1, 'exam'),
('3', '在线培训', '', 0, 0, 'train'),
('4', '课件题库', '', 0, 0, 'resource'),
('5', '成绩分析', '', 0, 0, 'analyse'),
('6', '扩展中心', '', 0, 0, 'extend'),
('7', '系统设置', '', 0, 0, 'system'),
('11', '欢迎页面', '', 1, 0, 'welcome'),
('12', '我的任务', '', 1, 0, 'assignmentList'),
('21', '考试管理', '', 2, 0, 'examManagement'),
('22', '试题管理', '', 2, 0, 'questionManagement'),
('23', '试卷管理', '', 2, 0, 'paperManagement'),
('31', '培训管理', '', 3, 0, 'trainingManagement'),
('41', '题库中心', '', 4, 0, 'questionBank'),
('42', '课件中心', '', 4, 0, 'coursewareCenter'),
('51', '成绩分析', '', 5, 0, ''),
('61', '在线调查', '', 6, 0, ''),
('62', '心理测试', '', 6, 0, ''),
('71', '用户管理', '/userNew.do', 7, 0, 'userManagement'),
('72', '角色管理', '/roleNew.do', 7, 0, 'roleManagement');

-- --------------------------------------------------------

--
-- 表的结构 `ex_role`
--

CREATE TABLE IF NOT EXISTS `ex_role` (
  `code` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(32) NOT NULL,
  PRIMARY KEY (`code`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `ex_role_authority`
--

CREATE TABLE IF NOT EXISTS `ex_role_authority` (
  `role_code` int(11) NOT NULL,
  `authority_code` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- 表的结构 `ex_user`
--

CREATE TABLE IF NOT EXISTS `ex_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `login_name` varchar(32) CHARACTER SET gbk NOT NULL,
  `login_pw` varchar(32) CHARACTER SET gbk NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `ex_user_role`
--

CREATE TABLE IF NOT EXISTS `ex_user_role` (
  `user_id` int(11) NOT NULL,
  `role_code` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
