-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTwiceCast.sql
More file actions
216 lines (173 loc) · 6.4 KB
/
TwiceCast.sql
File metadata and controls
216 lines (173 loc) · 6.4 KB
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Client : 127.0.0.1
-- Généré le : Mer 12 Juillet 2017 à 10:11
-- Version du serveur : 5.7.9
-- Version de PHP : 7.0.0
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 utf8mb4 */;
--
-- Base de données : `twicecast`
--
-- --------------------------------------------------------
--
-- Structure de la table `blocks`
--
DROP TABLE IF EXISTS `blocks`;
CREATE TABLE IF NOT EXISTS `blocks` (
`id_client` bigint(20) UNSIGNED NOT NULL,
`categorie_target` varchar(15) DEFAULT NULL,
`id_target` bigint(20) UNSIGNED NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `client`
--
DROP TABLE IF EXISTS `client`;
CREATE TABLE IF NOT EXISTS `client` (
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(15) NOT NULL,
`password` char(64) NOT NULL,
`email` varchar(255) NOT NULL,
`register_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`language` varchar(5) NOT NULL,
`private` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `client_role`
--
DROP TABLE IF EXISTS `client_role`;
CREATE TABLE IF NOT EXISTS `client_role` (
`id_client` bigint(20) UNSIGNED NOT NULL,
`id_role` bigint(20) UNSIGNED NOT NULL,
`categorie_target` varchar(15) DEFAULT NULL,
`id_target` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `followers`
--
DROP TABLE IF EXISTS `followers`;
CREATE TABLE IF NOT EXISTS `followers` (
`id_client` bigint(20) UNSIGNED NOT NULL,
`categorie_target` varchar(15) DEFAULT NULL,
`id_target` bigint(20) UNSIGNED NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `friends`
--
DROP TABLE IF EXISTS `friends`;
CREATE TABLE IF NOT EXISTS `friends` (
`id_client` bigint(20) UNSIGNED NOT NULL,
`id_friend` bigint(20) UNSIGNED NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `organization`
--
DROP TABLE IF EXISTS `organization`;
CREATE TABLE IF NOT EXISTS `organization` (
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(15) NOT NULL,
`language` varchar(5) NOT NULL,
`private` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `role`
--
DROP TABLE IF EXISTS `role`;
CREATE TABLE IF NOT EXISTS `role` (
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(15) NOT NULL,
`description` varchar(255) NOT NULL,
`categorie` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
--
-- Contenu de la table `role`
--
INSERT INTO `role` (`id`, `name`, `description`, `categorie`) VALUES
(1, 'Administrator', 'The highest role', NULL),
(2, 'Moderator', 'In charge of compliance with the TwiceCast''s charter', NULL),
(3, 'Guest', 'Normal user', NULL),
(4, 'Founder', 'The creator of the organization', 'Organisation'),
(5, 'Moderator', 'In charge of the respect of the rules of the organization', 'Organisation'),
(6, 'Streamer', 'Member authorized to use the organization''s streams to broadcast content', 'Organisation'),
(7, 'Guest', 'Member of the organization having special rights for access to the organization''s streams if it is private', 'Organisation'),
(8, 'Founder', 'The creator of the stream', 'Stream'),
(9, 'Co-Streamer', 'A user authorized to use this stream as his own', 'Stream'),
(10, 'Moderator', 'User in charge of the respect of the rules of the stream, especially in the chat', 'Stream'),
(11, 'Contributor', 'Honorific rank for a viewer having contributed to the stream by proposing helpful code', 'Stream'),
(12, 'Guest', 'User having special rights for access to the stream if it''s private', 'Stream');
-- --------------------------------------------------------
--
-- Structure de la table `server`
--
DROP TABLE IF EXISTS `server`;
CREATE TABLE IF NOT EXISTS `server` (
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(31) NOT NULL,
`password` varchar(64) NOT NULL,
`ipv4` varchar(15) DEFAULT NULL,
`ipv6` varchar(45) DEFAULT NULL,
`port` smallint(5) UNSIGNED NOT NULL,
`type` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `stream`
--
DROP TABLE IF EXISTS `stream`;
CREATE TABLE IF NOT EXISTS `stream` (
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(15) NOT NULL,
`short_description` varchar(255) DEFAULT NULL,
`private` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `subscribe`
--
DROP TABLE IF EXISTS `subscribe`;
CREATE TABLE IF NOT EXISTS `subscribe` (
`id_client` bigint(20) UNSIGNED NOT NULL,
`categorie_target` varchar(15) DEFAULT NULL,
`id_target` bigint(20) UNSIGNED NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `tag`
--
DROP TABLE IF EXISTS `tag`;
CREATE TABLE IF NOT EXISTS `tag` (
`id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(15) NOT NULL,
`short_description` varchar(255) NOT NULL,
`full_description` varchar(1023) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Structure de la table `tag_linked`
--
DROP TABLE IF EXISTS `tag_linked`;
CREATE TABLE IF NOT EXISTS `tag_linked` (
`id_tag_a` bigint(20) UNSIGNED NOT NULL,
`id_tag_b` bigint(20) UNSIGNED NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!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 */;