-
Notifications
You must be signed in to change notification settings - Fork 0
/
SwiftQuiz.sql
151 lines (123 loc) · 4.2 KB
/
SwiftQuiz.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Sep 05, 2015 at 08:28 AM
-- Server version: 5.6.17
-- PHP Version: 5.5.12
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 */;
--
-- Database: `swiftquiz`
--
CREATE DATABASE IF NOT EXISTS `swiftquiz` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `swiftquiz`;
-- --------------------------------------------------------
--
-- Table structure for table `answer`
--
CREATE TABLE IF NOT EXISTS `answer` (
`aid` bigint(20) NOT NULL AUTO_INCREMENT,
`uid` bigint(20) NOT NULL,
`eid` bigint(20) NOT NULL,
`pid` bigint(20) NOT NULL,
`anscontent` text NOT NULL,
`score` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`aid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `etag`
--
CREATE TABLE IF NOT EXISTS `etag` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`eid` bigint(20) NOT NULL,
`tagcontent` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `exam`
--
CREATE TABLE IF NOT EXISTS `exam` (
`eid` bigint(20) NOT NULL AUTO_INCREMENT,
`adminid` bigint(20) NOT NULL,
`uname` text NOT NULL,
`title` text NOT NULL,
`summary` text NOT NULL,
`date` datetime NOT NULL,
`ip` varchar(20) NOT NULL,
`timelimit` bigint(20) NOT NULL,
PRIMARY KEY (`eid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `problems`
--
CREATE TABLE IF NOT EXISTS `problems` (
`pid` bigint(20) NOT NULL AUTO_INCREMENT,
`eid` bigint(20) NOT NULL,
`pcontent` text CHARACTER SET utf8 NOT NULL,
`ansformat` text CHARACTER SET utf8 NOT NULL,
`ansunique` tinyint(4) NOT NULL,
`rightans` text CHARACTER SET utf8 NOT NULL,
`score` int(11) NOT NULL,
PRIMARY KEY (`pid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `uelink`
--
CREATE TABLE IF NOT EXISTS `uelink` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`eid` bigint(20) NOT NULL,
`uid` bigint(20) NOT NULL,
`answerip` varchar(20) NOT NULL,
`answerdate` datetime NOT NULL,
`duration` bigint(20) NOT NULL,
`score` int(11) NOT NULL,
`status` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE IF NOT EXISTS `user` (
`uid` bigint(20) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`age` tinyint(4) NOT NULL,
`sex` tinyint(4) NOT NULL,
`email` varchar(50) NOT NULL,
`lastlogintime` datetime NOT NULL,
`lastloginip` varchar(24) NOT NULL,
`regtime` datetime NOT NULL,
`regip` varchar(24) NOT NULL,
`status` tinyint(4) NOT NULL,
`type` tinyint(4) NOT NULL,
PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=29 ;
--
-- Dumping data for table `user`
--
INSERT INTO `user` (`uid`, `username`, `password`, `age`, `sex`, `email`, `lastlogintime`, `lastloginip`, `regtime`, `regip`, `status`, `type`) VALUES
(27, 'admin', '12345678', 20, 0, '[email protected]', '2015-09-05 12:28:50', '127.0.0.1', '2015-09-05 12:28:50', '127.0.0.1', 1, 1);
-- --------------------------------------------------------
--
-- Table structure for table `utag`
--
CREATE TABLE IF NOT EXISTS `utag` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`uid` bigint(20) NOT NULL,
`tagcontent` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
/*!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 */;