-- phpMyAdmin SQL Dump
-- version 2.11.2.1
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2011 年 10 月 19 日 07:42
-- 服务器版本: 5.0.45
-- PHP 版本: 5.2.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- 数据库: `qinzi_db0`
--
-- --------------------------------------------------------
--
-- 表的结构 `actives`
--
DROP TABLE IF EXISTS `actives`;
CREATE TABLE IF NOT EXISTS `actives` (
`actives_id` int(11) NOT NULL auto_increment COMMENT '活动id',
`actives_title` text NOT NULL COMMENT '活动标题',
`actives_content` longtext NOT NULL COMMENT '活动内容',
`targets_id` int(11) NOT NULL COMMENT '活动对象',
`actives_limit` int(11) NOT NULL COMMENT '活动限制人数',
`actives_start` datetime NOT NULL COMMENT '活动开始日期',
`actives_end` datetime NOT NULL COMMENT '活动结束日期',
`actives_reg_start` datetime NOT NULL COMMENT '活动报名开始时间',
`actives_reg_end` datetime NOT NULL COMMENT '活动报名结束时间',
`actives_attachment` text NOT NULL COMMENT '活动附加档案',
`actives_excerpt` text NOT NULL COMMENT '活动关键字',
`actives_url` text NOT NULL COMMENT '活动相关连接',
`departments_id` int(11) NOT NULL COMMENT '活动主办部门',
`actives_employee` varchar(50) character set ucs2 NOT NULL COMMENT '活动承办人员',
`employee_tel` varchar(50) NOT NULL COMMENT '活动承办人联系电话',
`actives_note` text NOT NULL COMMENT '活动备注',
PRIMARY KEY (`actives_id`),
KEY `targets_id` (`targets_id`),
KEY `departments_id` (`departments_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
--
-- 导出表中的数据 `actives`
--
INSERT INTO `actives` (`actives_id`, `actives_title`, `actives_content`, `targets_id`, `actives_limit`, `actives_start`, `actives_end`, `actives_reg_start`, `actives_reg_end`, `actives_attachment`, `actives_excerpt`, `actives_url`, `departments_id`, `actives_employee`, `employee_tel`, `actives_note`) VALUES
(1, '迎新晚会', '迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~迎新了~', 3, 50, '2011-10-21 14:01:41', '2011-10-22 14:01:46', '2011-10-19 14:01:52', '2011-10-20 14:01:54', '/upfiles/abc123.pdf', '迎新', 'http://www.baidu.com', 2, '袁世凯', '150050505000', '前10名送罗技光电鼠标一个。');
-- --------------------------------------------------------
--
-- 表的结构 `departments`
--
DROP TABLE IF EXISTS `departments`;
CREATE TABLE IF NOT EXISTS `departments` (
`departments_id` int(11) NOT NULL auto_increment COMMENT '部门id',
`departments_name` varchar(50) NOT NULL COMMENT '部门名称',
PRIMARY KEY (`departments_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=12 ;
--
-- 导出表中的数据 `departments`
--
INSERT INTO `departments` (`departments_id`, `departments_name`) VALUES
(1, '学工部'),
(2, '应用科技学院'),
(3, '院学生会'),
(4, '海外教育学院'),
(5, '软件学院'),
(6, '传播学院'),
(7, '数学与计算机学院'),
(8, '校学生会'),
(9, '校财政处'),
(10, '校武装部'),
(11, '校党委');
-- --------------------------------------------------------
--
-- 表的结构 `groups`
--
DROP TABLE IF EXISTS `groups`;
CREATE TABLE IF NOT EXISTS `groups` (
`groups_id` int(11) NOT NULL auto_increment COMMENT '分组id',
`groups_name` varchar(50) NOT NULL COMMENT '分组名称',
PRIMARY KEY (`groups_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
--
-- 导出表中的数据 `groups`
--
INSERT INTO `groups` (`groups_id`, `groups_name`) VALUES
(1, '普通用户'),
(2, '管理员'),
(3, 'VIP用户');
-- --------------------------------------------------------
--
-- 表的结构 `notices`
--
DROP TABLE IF EXISTS `notices`;
CREATE TABLE IF NOT EXISTS `notices` (
`notices_id` int(11) NOT NULL auto_increment COMMENT '公告id',
`notices_content` longtext character set utf8 NOT NULL COMMENT '公告内容',
`notices_date` datetime NOT NULL COMMENT '公告发布时间',
PRIMARY KEY (`notices_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;
--
-- 导出表中的数据 `notices`
--
INSERT INTO `notices` (`notices_id`, `notices_content`, `notices_date`) VALUES
(1, '好消息:学生街<新发型>理发店活免费理发卡(3次)免费赠送啦。需要的老师、同学们可以前来校后勤部(生活A区8号楼101)领取。', '2011-10-19 14:47:29'),
(2, '大家好。。。大家好。。。大家好。。。大家好。。。', '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- 表的结构 `signs`
--
DROP TABLE IF EXISTS `signs`;
CREATE TABLE IF NOT EXISTS `signs` (
`sign_id` int(11) NOT NULL auto_increment COMMENT '报名id',
`actives_id` int(11) NOT NULL COMMENT '报名的活动id',
`users_id` int(11) NOT NULL COMMENT '报名的用户id',
PRIMARY KEY (`sign_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
--
-- 导出表中的数据 `signs`
--
-- --------------------------------------------------------
--
-- 表的结构 `targets`
--
DROP TABLE IF EXISTS `targets`;
CREATE TABLE IF NOT EXISTS `targets` (
`targets_id` int(11) NOT NULL auto_increment COMMENT '对象id',
`targets_name` varchar(50) NOT NULL COMMENT '对象名称',
PRIMARY KEY (`targets_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=4 ;
--
-- 导出表中的数据 `targets`
--
INSERT INTO `targets` (`targets_id`, `targets_name`) VALUES
(1, '学生'),
(2, '老师'),
(3, '不限制');
-- --------------------------------------------------------
--
-- 表的结构 `users`
--
DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
`users_id` int(10) NOT NULL auto_increment COMMENT '用户id',
`user_login` varchar(60) NOT NULL COMMENT '用户登录名',
`user_pass` varchar(64) NOT NULL COMMENT '用户登录密码',
`user_nicename` varchar(50) NOT NULL COMMENT '用户昵称',
`user_email` varchar(100) NOT NULL COMMENT '用户email',
`user_registered` datetime NOT NULL COMMENT '用户注册时间',
`user_vip_key` varchar(60) NOT NULL COMMENT '用户VIP码',
`user_status` tinyint(1) NOT NULL default '0' COMMENT '用户状态(0开启,1关闭)',
`groups_id` int(11) NOT NULL COMMENT '用户分组',
PRIMARY KEY (`users_id`),
KEY `groups_id` (`groups_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
--
-- 导出表中的数据 `users`
--
INSERT INTO `users` (`users_id`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_registered`, `user_vip_key`, `user_status`, `groups_id`) VALUES
(1, 'admin', 'admin888', '管理员', '[email protected]', '2011-10-19 14:17:38', '', 0, 2),
(2, 'guest', '123456', '游客', '[email protected]', '2011-10-20 14:19:22', '', 0, 1),
(3, 'honey', 'honey520', '张小凡', '[email protected]', '2011-10-20 14:20:33', '32a4ac93f5d74a6af47b196d35893a28', 0, 3),
(4, 'thief', '321123', '南宫问天', '[email protected]', '2011-10-07 14:24:00', 'f213498c7bc5feebb831d2928412a5ae', 1, 3);
--
-- 限制导出的表
--
--
-- 限制表 `actives`
--
ALTER TABLE `actives`
ADD CONSTRAINT `actives_ibfk_2` FOREIGN KEY (`departments_id`) REFERENCES `departments` (`departments_id`),
ADD CONSTRAINT `actives_ibfk_1` FOREIGN KEY (`targets_id`) REFERENCES `targets` (`targets_id`);
--
-- 限制表 `users`
--
ALTER TABLE `users`
ADD CONSTRAINT `users_ibfk_1` FOREIGN KEY (`groups_id`) REFERENCES `groups` (`groups_id`);
似乎对象表根本不需要?反正是被老师给问倒了!