-
Notifications
You must be signed in to change notification settings - Fork 0
/
live.sql
64 lines (59 loc) · 2.45 KB
/
live.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
// 球队表
CREATE TABLE `live_team`(
`id` tinyint(1) unsigned NOT NULL auto_increment,
`name` VARCHAR(20) NOT NULL DEFAULT '',
`image` VARCHAR(20) NOT NULL DEFAULT '',
`type` tinyint(1) unsigned NOT NULL DEFAULT 0,
`create_time` int(10) unsigned NOT NULL DEFAULT 0,
`update_time` int(10) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT charset=utf8;
// 直播表
CREATE TABLE `live_game`(
`id` int(10) unsigned NOT NULL auto_increment,
`a_id` tinyint(1) unsigned NOT NULL DEFAULT 0,
`b_id` tinyint(1) unsigned NOT NULL DEFAULT 0,
`a_score` int(10) unsigned NOT NULL DEFAULT 0,
`b_score` int(10) unsigned NOT NULL DEFAULT 0,
`narrator` VARCHAR(20) NOT NULL DEFAULT '',
`image` VARCHAR(20) NOT NULL DEFAULT '',
`start_time` int(10) unsigned NOT NULL DEFAULT 0,
`status` tinyint(1) unsigned NOT NULL DEFAULT 0,
`create_time` int(10) unsigned NOT NULL DEFAULT 0,
`update_time` int(10) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT charset=utf8;
// 球员表
CREATE TABLE `live_player`(
`id` int(10) unsigned NOT NULL auto_increment,
`name` VARCHAR(20) NOT NULL DEFAULT '',
`image` VARCHAR(20) NOT NULL DEFAULT '',
`age` tinyint(1) unsigned NOT NULL DEFAULT 0,
`position` tinyint(1) unsigned NOT NULL DEFAULT 0,
`status` tinyint(1) unsigned NOT NULL DEFAULT 0,
`create_time` int(10) unsigned NOT NULL DEFAULT 0,
`update_time` int(10) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT charset=utf8;
//赛事的赛况表
CREATE TABLE `live_outs`(
`id` int(10) unsigned NOT NULL auto_increment,
`game_id` int(10) unsigned NOT NULL DEFAULT 0,
`team_id` tinyint(1) unsigned NOT NULL DEFAULT 0,
`content` VARCHAR(200) NOT NULL DEFAULT '',
`image` VARCHAR(20) NOT NULL DEFAULT '',
`type` tinyint(1) unsigned NOT NULL DEFAULT 0,
`status` tinyint(1) unsigned NOT NULL DEFAULT 0,
`create_time` int(10) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT charset=utf8;
//聊天室表
CREATE TABLE `live_chart`(
`id` int(10) unsigned NOT NULL auto_increment,
`game_id` int(10) unsigned NOT NULL DEFAULT 0,
`user_id` tinyint(1) unsigned NOT NULL DEFAULT 0,
`content` VARCHAR(200) NOT NULL DEFAULT '',
`status` tinyint(1) unsigned NOT NULL DEFAULT 0,
`create_time` int(10) unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT charset=utf8;