Skip to content

Commit 70537c4

Browse files
committed
add database sql
1 parent 8e0857f commit 70537c4

File tree

1 file changed

+244
-0
lines changed

1 file changed

+244
-0
lines changed

sql/ccms.sql

Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
1+
DROP TABLE IF EXISTS `t_access_log`;
2+
CREATE TABLE `t_access_log` (
3+
`id` int(11) NOT NULL auto_increment,
4+
`user_id` varchar(20) NOT NULL,
5+
`ip` varchar(20) default NULL,
6+
`login_time` datetime default NULL,
7+
`logout_time` datetime default NULL,
8+
`status` int(11) default NULL,
9+
PRIMARY KEY (`id`)
10+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
11+
12+
/*!40000 ALTER TABLE `t_access_log` DISABLE KEYS */;
13+
LOCK TABLES `t_access_log` WRITE;
14+
INSERT INTO `t_access_log` VALUES (1,'1','127.0.0.1','2015-01-01 16:08:47',NULL,1),(2,'1','127.0.0.1','2015-01-01 16:44:48',NULL,1),(3,'1','127.0.0.1','2015-01-01 16:46:34',NULL,1),(4,'1','127.0.0.1','2015-01-01 16:51:28',NULL,1),(5,'1','127.0.0.1','2015-01-01 22:09:49',NULL,1),(6,'1','127.0.0.1','2015-01-01 22:12:41',NULL,1),(7,'1','127.0.0.1','2015-01-01 22:19:15',NULL,1),(8,'1','127.0.0.1','2015-01-01 22:25:15',NULL,1),(9,'1','127.0.0.1','2015-01-01 22:30:51',NULL,1),(10,'1','127.0.0.1','2015-01-01 22:31:28',NULL,1),(11,'1','127.0.0.1','2015-01-01 22:33:13',NULL,1),(12,'1','127.0.0.1','2015-01-01 22:39:32',NULL,1),(13,'1','127.0.0.1','2015-01-01 22:41:22',NULL,1),(14,'1','127.0.0.1','2015-01-01 22:54:01',NULL,1),(15,'1','127.0.0.1','2015-01-01 23:04:43',NULL,1),(16,'1','127.0.0.1','2015-01-02 10:22:44',NULL,1),(17,'1','127.0.0.1','2015-01-02 10:31:17',NULL,1),(18,'1','127.0.0.1','2015-01-02 10:34:06',NULL,1),(19,'1','127.0.0.1','2015-01-02 10:34:23',NULL,1),(20,'1','127.0.0.1','2015-01-02 18:52:35',NULL,1),(21,'1','127.0.0.1','2015-01-02 18:57:02',NULL,1),(22,'1','127.0.0.1','2015-01-02 19:00:16',NULL,1),(23,'1','127.0.0.1','2015-01-02 21:50:34',NULL,1),(24,'1','127.0.0.1','2015-01-02 21:53:46',NULL,1),(25,'1','127.0.0.1','2015-01-02 21:56:50',NULL,1),(26,'1','127.0.0.1','2015-01-02 22:06:49',NULL,1),(27,'1','127.0.0.1','2015-01-02 22:40:10',NULL,1),(28,'1','127.0.0.1','2015-01-02 22:49:09',NULL,1),(29,'1','127.0.0.1','2015-01-02 22:51:39',NULL,1),(30,'1','127.0.0.1','2015-01-03 11:29:28',NULL,1),(31,'1','127.0.0.1','2015-01-03 12:11:37',NULL,1),(32,'1','127.0.0.1','2015-01-03 12:13:33',NULL,1),(33,'1','127.0.0.1','2015-01-03 12:17:03',NULL,1),(34,'1','127.0.0.1','2015-01-03 12:50:05',NULL,1),(35,'1','127.0.0.1','2015-01-03 13:03:03',NULL,1),(36,'1','127.0.0.1','2015-01-03 13:03:51',NULL,1),(37,'1','127.0.0.1','2015-01-03 13:28:06',NULL,1);
15+
UNLOCK TABLES;
16+
/*!40000 ALTER TABLE `t_access_log` ENABLE KEYS */;
17+
18+
--
19+
-- Table structure for table `t_activities`
20+
--
21+
22+
DROP TABLE IF EXISTS `t_activities`;
23+
CREATE TABLE `t_activities` (
24+
`id` int(11) NOT NULL auto_increment,
25+
`name` varchar(60) NOT NULL,
26+
`col_id` int(11) default NULL,
27+
`publish_time` datetime default NULL,
28+
`date_time` varchar(30) default NULL,
29+
`end_date` date default NULL,
30+
`location` varchar(60) default NULL,
31+
`aim` varchar(30) default NULL,
32+
`content` varchar(60) default NULL,
33+
`activity_type` int(11) default NULL,
34+
`duration` int(11) default NULL,
35+
`act_object` varchar(30) default NULL,
36+
`number` int(11) default NULL,
37+
`contact` varchar(20) default NULL,
38+
`phone` varchar(20) default NULL,
39+
`assist` varchar(20) default NULL,
40+
`status` int(11) default NULL,
41+
PRIMARY KEY (`id`)
42+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
43+
44+
--
45+
-- Dumping data for table `t_activities`
46+
--
47+
48+
49+
/*!40000 ALTER TABLE `t_activities` DISABLE KEYS */;
50+
LOCK TABLES `t_activities` WRITE;
51+
INSERT INTO `t_activities` VALUES (1,'大扫除',4,'2015-01-02 00:00:00','2015年1月3号 下午三点','2015-01-03','校内','活动目的','活动内容',1,2,'11计算机三班',30,'李老师','123','张三李四',1),(2,'123',4,'2015-01-02 00:00:00','本周日上午九点','2015-01-02','八教','活动目的','活动内容',2,2,'12生物工程',20,'张老师','123','王五',1),(3,'456',4,'2015-01-02 00:00:00','下午2点','2015-01-03','九教','活动目的','活动内容',3,3,'全校学生',30,'王老师','222','赵六',1),(4,'222',4,'2015-01-02 00:00:00','rer','2015-01-03','dgg','fsdf','fdsf',1,3,'fsdf',43,'fdsf','333','fsdf',1);
52+
UNLOCK TABLES;
53+
/*!40000 ALTER TABLE `t_activities` ENABLE KEYS */;
54+
55+
--
56+
-- Table structure for table `t_activity_item`
57+
--
58+
59+
DROP TABLE IF EXISTS `t_activity_item`;
60+
CREATE TABLE `t_activity_item` (
61+
`id` int(11) NOT NULL auto_increment,
62+
`act_id` int(11) default NULL,
63+
`stu_id` int(11) default NULL,
64+
`audit` int(11) default NULL,
65+
PRIMARY KEY (`id`)
66+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
67+
68+
--
69+
-- Dumping data for table `t_activity_item`
70+
--
71+
72+
73+
/*!40000 ALTER TABLE `t_activity_item` DISABLE KEYS */;
74+
LOCK TABLES `t_activity_item` WRITE;
75+
INSERT INTO `t_activity_item` VALUES (1,1,1,1),(2,2,1,-1),(3,3,1,1),(4,4,1,1);
76+
UNLOCK TABLES;
77+
/*!40000 ALTER TABLE `t_activity_item` ENABLE KEYS */;
78+
79+
--
80+
-- Table structure for table `t_activity_type`
81+
--
82+
83+
DROP TABLE IF EXISTS `t_activity_type`;
84+
CREATE TABLE `t_activity_type` (
85+
`id` int(11) NOT NULL auto_increment,
86+
`name` varchar(30) NOT NULL,
87+
PRIMARY KEY (`id`),
88+
UNIQUE KEY `name` (`name`)
89+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
90+
91+
--
92+
-- Dumping data for table `t_activity_type`
93+
--
94+
95+
96+
/*!40000 ALTER TABLE `t_activity_type` DISABLE KEYS */;
97+
LOCK TABLES `t_activity_type` WRITE;
98+
INSERT INTO `t_activity_type` VALUES (1,'劳务类'),(3,'实践类'),(2,'文体类');
99+
UNLOCK TABLES;
100+
/*!40000 ALTER TABLE `t_activity_type` ENABLE KEYS */;
101+
102+
--
103+
-- Table structure for table `t_colleges`
104+
--
105+
106+
DROP TABLE IF EXISTS `t_colleges`;
107+
CREATE TABLE `t_colleges` (
108+
`id` int(11) NOT NULL auto_increment,
109+
`account` varchar(20) NOT NULL,
110+
`name` varchar(20) NOT NULL,
111+
`pwd` varchar(30) default NULL,
112+
`phone` varchar(20) default NULL,
113+
`contact` varchar(20) default NULL,
114+
`address` varchar(30) default NULL,
115+
`authority` int(11) NOT NULL,
116+
PRIMARY KEY (`id`),
117+
UNIQUE KEY `account` (`account`),
118+
UNIQUE KEY `name` (`name`)
119+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
120+
121+
--
122+
-- Dumping data for table `t_colleges`
123+
--
124+
125+
126+
/*!40000 ALTER TABLE `t_colleges` DISABLE KEYS */;
127+
LOCK TABLES `t_colleges` WRITE;
128+
INSERT INTO `t_colleges` VALUES (1,'admin','勤工助学管理中心','111','222','张三','长江西路130号',1),(3,'zbxy1','植物保护学院1','1231','1234561','陶老师1','植保楼1',0),(4,'jsjxy','信息与计算机学院','111','111','张老师','经济楼401',0);
129+
UNLOCK TABLES;
130+
/*!40000 ALTER TABLE `t_colleges` ENABLE KEYS */;
131+
132+
--
133+
-- Table structure for table `t_rank_activity_type`
134+
--
135+
136+
DROP TABLE IF EXISTS `t_rank_activity_type`;
137+
CREATE TABLE `t_rank_activity_type` (
138+
`id` int(11) NOT NULL auto_increment,
139+
`rank_id` int(11) default NULL,
140+
`activity_type_id` int(11) default NULL,
141+
`duration` int(11) default NULL,
142+
PRIMARY KEY (`id`)
143+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
144+
145+
--
146+
-- Dumping data for table `t_rank_activity_type`
147+
--
148+
149+
150+
/*!40000 ALTER TABLE `t_rank_activity_type` DISABLE KEYS */;
151+
LOCK TABLES `t_rank_activity_type` WRITE;
152+
INSERT INTO `t_rank_activity_type` VALUES (1,1,1,30),(2,1,2,20),(3,1,3,20),(4,2,1,30),(5,2,2,20),(6,2,3,15),(7,3,1,30),(8,3,2,15),(9,3,3,15);
153+
UNLOCK TABLES;
154+
/*!40000 ALTER TABLE `t_rank_activity_type` ENABLE KEYS */;
155+
156+
--
157+
-- Table structure for table `t_ranks`
158+
--
159+
160+
DROP TABLE IF EXISTS `t_ranks`;
161+
CREATE TABLE `t_ranks` (
162+
`id` int(11) NOT NULL auto_increment,
163+
`name` varchar(30) NOT NULL,
164+
PRIMARY KEY (`id`),
165+
UNIQUE KEY `name` (`name`)
166+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
167+
168+
--
169+
-- Dumping data for table `t_ranks`
170+
--
171+
172+
173+
/*!40000 ALTER TABLE `t_ranks` DISABLE KEYS */;
174+
LOCK TABLES `t_ranks` WRITE;
175+
INSERT INTO `t_ranks` VALUES (3,'丙等'),(2,'乙等'),(1,'甲等');
176+
UNLOCK TABLES;
177+
/*!40000 ALTER TABLE `t_ranks` ENABLE KEYS */;
178+
179+
--
180+
-- Table structure for table `t_specialty`
181+
--
182+
183+
DROP TABLE IF EXISTS `t_specialty`;
184+
CREATE TABLE `t_specialty` (
185+
`id` int(11) NOT NULL auto_increment,
186+
`name` varchar(30) NOT NULL,
187+
`col_id` int(11) default NULL,
188+
PRIMARY KEY (`id`),
189+
UNIQUE KEY `name` (`name`)
190+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
191+
192+
--
193+
-- Dumping data for table `t_specialty`
194+
--
195+
196+
197+
/*!40000 ALTER TABLE `t_specialty` DISABLE KEYS */;
198+
LOCK TABLES `t_specialty` WRITE;
199+
INSERT INTO `t_specialty` VALUES (1,'计算机',4),(2,'网络工程',4);
200+
UNLOCK TABLES;
201+
/*!40000 ALTER TABLE `t_specialty` ENABLE KEYS */;
202+
203+
--
204+
-- Table structure for table `t_students`
205+
--
206+
207+
DROP TABLE IF EXISTS `t_students`;
208+
CREATE TABLE `t_students` (
209+
`id` int(11) NOT NULL auto_increment,
210+
`num` int(11) NOT NULL,
211+
`pwd` varchar(30) NOT NULL,
212+
`name` varchar(20) NOT NULL,
213+
`gender` varchar(5) default NULL,
214+
`phone` varchar(20) default NULL,
215+
`email` varchar(30) default NULL,
216+
`qq` varchar(11) default NULL,
217+
`col_id` int(11) default NULL,
218+
`spec_id` int(11) default NULL,
219+
`introduce` varchar(60) default NULL,
220+
`rank_id` int(11) default NULL,
221+
PRIMARY KEY (`id`),
222+
UNIQUE KEY `num` (`num`)
223+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
224+
225+
--
226+
-- Dumping data for table `t_students`
227+
--
228+
229+
230+
/*!40000 ALTER TABLE `t_students` DISABLE KEYS */;
231+
LOCK TABLES `t_students` WRITE;
232+
INSERT INTO `t_students` VALUES (1,11,'123','一号程序员','','123','[email protected]','123',4,1,'暂无介绍...',1);
233+
UNLOCK TABLES;
234+
/*!40000 ALTER TABLE `t_students` ENABLE KEYS */;
235+
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
236+
237+
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
238+
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
239+
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
240+
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
241+
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
242+
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
243+
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
244+

0 commit comments

Comments
 (0)