-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsql.sql
83 lines (75 loc) · 2.17 KB
/
sql.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
create user 'zvms'@'127.0.0.1' identified by '123456';
grant SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
on *.* to 'zvms'@'127.0.0.1' with grant option;
flush privileges;
create database zvms;
use zvms;
create table user (
userId int AUTO_INCREMENT,
userName char(64),
class int,
permission smallint,
notices text,
password char(255),
primary key (userId)
)charset=utf8;
insert into user (userName,class,permission,password)
values ("高一1班",202001,0,"e10adc3949ba59abbe56e057f20f883e");
insert into user (userName,class,permission,password)
values ("高一2班",202002,0,"e10adc3949ba59abbe56e057f20f883e");
insert into user (userName,class,permission,password)
values ("Admin",110001,3,"e10adc3949ba59abbe56e057f20f883e");
create table student (
stuId int,
stuName char(64),
volTimeInside int,
volTimeOutside int,
volTimeLarge int,
primary key (stuId)
)charset=utf8;
insert into student (stuId,stuName,volTimeInside,volTimeOutside,volTimeLarge)
values (20200101,"张三",0,0,0);
insert into student (stuId,stuName,volTimeInside,volTimeOutside,volTimeLarge)
values (20200102,"张",10,0,0);
insert into student (stuId,stuName,volTimeInside,volTimeOutside,volTimeLarge)
values (20200201,"三",100,0,0);
insert into student (stuId,stuName,volTimeInside,volTimeOutside,volTimeLarge)
values (20200202,"三张",20,36,4);
create table volunteer (
volId int AUTO_INCREMENT,
volName char(255),
volDate char(64),
volTime char(64),
stuMax int,
nowStuCount int,
description text,
status smallint,
volTimeInside int,
volTimeOutside int,
volTimeLarge int,
holderId int,
primary key (volId)
)charset=utf8;
create table stu_vol (
volId int,
stuId int,
status smallint,
volTimeInside int,
volTimeOutside int,
volTimeLarge int,
thought text,
picture text /* 图片的md5 */
)charset=utf8;
create table class_vol (
volId int,
class int,
stuMax int,
nowStuCount int
)charset=utf8;
create table user_notice (
noticeTitle text,
noticeText text,
deadTime text,
noticeId int AUTO_INCREMENT,
primary key (noticeId)
)charset=utf8;