-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathtrytv_2017-11-30.sql
503 lines (406 loc) · 20.7 KB
/
trytv_2017-11-30.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
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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: www.cnfluffy.com (MySQL 5.5.51-MariaDB)
# Database: trytv
# Generation Time: 2017-11-29 17:34:00 +0000
# ************************************************************
/*!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 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
# Dump of table article_episode
# ------------------------------------------------------------
CREATE TABLE `article_episode` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`article_id` int(10) unsigned NOT NULL,
`episode_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `article_episode_article_id_index` (`article_id`),
KEY `article_episode_episode_id_index` (`episode_id`),
CONSTRAINT `article_episode_article_id_foreign` FOREIGN KEY (`article_id`) REFERENCES `articles` (`id`) ON DELETE CASCADE,
CONSTRAINT `article_episode_episode_id_foreign` FOREIGN KEY (`episode_id`) REFERENCES `episodes` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table article_movie
# ------------------------------------------------------------
CREATE TABLE `article_movie` (
`article_id` int(10) unsigned NOT NULL,
`movie_id` int(10) unsigned NOT NULL,
KEY `article_movie_article_id_index` (`article_id`),
KEY `article_movie_movie_id_index` (`movie_id`),
CONSTRAINT `article_movie_article_id_foreign` FOREIGN KEY (`article_id`) REFERENCES `articles` (`id`) ON DELETE CASCADE,
CONSTRAINT `article_movie_movie_id_foreign` FOREIGN KEY (`movie_id`) REFERENCES `movies` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table article_show
# ------------------------------------------------------------
CREATE TABLE `article_show` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`show_id` int(10) unsigned NOT NULL,
`article_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `article_show_show_id_index` (`show_id`),
KEY `article_show_article_id_index` (`article_id`),
CONSTRAINT `article_show_article_id_foreign` FOREIGN KEY (`article_id`) REFERENCES `articles` (`id`) ON DELETE CASCADE,
CONSTRAINT `article_show_show_id_foreign` FOREIGN KEY (`show_id`) REFERENCES `shows` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table article_tag
# ------------------------------------------------------------
CREATE TABLE `article_tag` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`article_id` int(10) unsigned NOT NULL,
`tag_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `article_tag_article_id_index` (`article_id`),
KEY `article_tag_tag_id_index` (`tag_id`),
CONSTRAINT `article_tag_article_id_foreign` FOREIGN KEY (`article_id`) REFERENCES `articles` (`id`) ON DELETE CASCADE,
CONSTRAINT `article_tag_tag_id_foreign` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table articles
# ------------------------------------------------------------
CREATE TABLE `articles` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`body` longtext COLLATE utf8_unicode_ci NOT NULL,
`url_provider` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`key_word` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`raw_title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '爬去的标题',
`raw_content` longtext COLLATE utf8_unicode_ci COMMENT '爬去的内容',
`video_title` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '视频标题',
`url_video` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '视频地址',
`coverage_uri` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '封面图片的uri/key',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`video_code` text COLLATE utf8_unicode_ci COMMENT '视频播放代码(准备放弃)',
`is_show` tinyint(1) unsigned NOT NULL COMMENT '废弃和deleted_at重复',
PRIMARY KEY (`id`),
KEY `url_title_unique` (`raw_title`,`url_provider`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table episodes
# ------------------------------------------------------------
CREATE TABLE `episodes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '重新计算的结果',
`raw_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`provider` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`url_provider` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`season` smallint(6) NOT NULL,
`episode` smallint(6) NOT NULL,
`show_id` int(10) unsigned NOT NULL,
`size` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`quality` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`is_auth` tinyint(1) NOT NULL,
`url_torrent` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`url_magnet` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`url_ed2k` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`url_baidupan` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`url_other` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`url_video` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`like_count` mediumint(8) unsigned NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`movie_id` int(10) unsigned NOT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `episodes_raw_name_unique` (`raw_name`),
KEY `episodes_show_id_foreign` (`show_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table ht_user
# ------------------------------------------------------------
CREATE TABLE `ht_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
`phone` varchar(12) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `email_index` (`email`) USING BTREE,
KEY `phone_index` (`phone`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
# Dump of table image_movie
# ------------------------------------------------------------
CREATE TABLE `image_movie` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`image_id` int(10) unsigned NOT NULL,
`movie_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `image_movie_image_id_index` (`image_id`),
KEY `image_movie_movie_id_index` (`movie_id`),
CONSTRAINT `image_movie_image_id_foreign` FOREIGN KEY (`image_id`) REFERENCES `images` (`id`),
CONSTRAINT `image_movie_movie_id_foreign` FOREIGN KEY (`movie_id`) REFERENCES `movies` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table image_show
# ------------------------------------------------------------
CREATE TABLE `image_show` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`show_id` int(10) unsigned NOT NULL,
`image_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `image_show_show_id_index` (`show_id`),
KEY `image_show_image_id_index` (`image_id`),
CONSTRAINT `image_show_image_id_foreign` FOREIGN KEY (`image_id`) REFERENCES `images` (`id`),
CONSTRAINT `image_show_show_id_foreign` FOREIGN KEY (`show_id`) REFERENCES `shows` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table images
# ------------------------------------------------------------
CREATE TABLE `images` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`key` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`article_id` int(10) unsigned NOT NULL,
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`bucket` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`fname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`fsize` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`width` int(10) unsigned NOT NULL,
`height` int(10) unsigned NOT NULL,
`format` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`imgur_id` int(10) unsigned DEFAULT NULL COMMENT '管理imgur模型',
PRIMARY KEY (`id`),
UNIQUE KEY `images_key_unique` (`key`),
KEY `imgur_id` (`imgur_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table imgurs
# ------------------------------------------------------------
CREATE TABLE `imgurs` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`imgur_id` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL,
`title` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`title_translation` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`keywords` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`description_translation` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`is_published` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table jobs
# ------------------------------------------------------------
CREATE TABLE `jobs` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`queue` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`payload` longtext COLLATE utf8_unicode_ci NOT NULL,
`attempts` tinyint(3) unsigned NOT NULL,
`reserved` tinyint(3) unsigned NOT NULL,
`reserved_at` int(10) unsigned DEFAULT NULL,
`available_at` int(10) unsigned NOT NULL,
`created_at` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `jobs_queue_reserved_reserved_at_index` (`queue`,`reserved`,`reserved_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table migrations
# ------------------------------------------------------------
CREATE TABLE `migrations` (
`migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table movies
# ------------------------------------------------------------
CREATE TABLE `movies` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`name_en` text COLLATE utf8_unicode_ci NOT NULL,
`name_zh` text COLLATE utf8_unicode_ci NOT NULL,
`playwright` text COLLATE utf8_unicode_ci NOT NULL,
`publish_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`grade` text COLLATE utf8_unicode_ci NOT NULL,
`length` text COLLATE utf8_unicode_ci NOT NULL,
`official_url` text COLLATE utf8_unicode_ci NOT NULL,
`detail` longtext COLLATE utf8_unicode_ci NOT NULL,
`key_word` text COLLATE utf8_unicode_ci NOT NULL,
`description` text COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table password_resets
# ------------------------------------------------------------
CREATE TABLE `password_resets` (
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
KEY `password_resets_email_index` (`email`),
KEY `password_resets_token_index` (`token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table quotes
# ------------------------------------------------------------
CREATE TABLE `quotes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`english` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`chinese` mediumtext COLLATE utf8_unicode_ci NOT NULL,
`writer` text COLLATE utf8_unicode_ci NOT NULL,
`image_uri` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table sessions
# ------------------------------------------------------------
CREATE TABLE `sessions` (
`id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`user_id` int(11) DEFAULT NULL,
`ip_address` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`user_agent` text COLLATE utf8_unicode_ci,
`payload` text COLLATE utf8_unicode_ci NOT NULL,
`last_activity` int(11) NOT NULL,
UNIQUE KEY `sessions_id_unique` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table shows
# ------------------------------------------------------------
CREATE TABLE `shows` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name_en` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`name_zh` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`detail` longtext COLLATE utf8_unicode_ci NOT NULL,
`key_word` text COLLATE utf8_unicode_ci NOT NULL,
`description` text COLLATE utf8_unicode_ci NOT NULL,
`type` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`director` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`play_writer` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`actor` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`alias` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '美剧其他中文名称,逗号分隔',
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table subtitles
# ------------------------------------------------------------
CREATE TABLE `subtitles` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`source_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '抓取地址',
`name_zh` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '中文名称',
`name_en` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '英文名称',
`version` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '视频格式版本',
`file_name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '字幕文件名',
`lang` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '语言',
`format` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '字幕格式',
`url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '字幕原来地址',
`uri` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'oss地址',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `source_url` (`source_url`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table tags
# ------------------------------------------------------------
CREATE TABLE `tags` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`name_en` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`image_id` int(11) NOT NULL,
`key_word` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`deleted_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table users
# ------------------------------------------------------------
CREATE TABLE `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(60) COLLATE utf8_unicode_ci NOT NULL,
`honor_point` mediumint(9) NOT NULL,
`nick_name` char(20) COLLATE utf8_unicode_ci NOT NULL,
`slogan` char(40) COLLATE utf8_unicode_ci NOT NULL,
`avatar_image` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`github_id` int(11) NOT NULL,
`github_token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`github_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`github_nickname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`github_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`github_avatar` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`github_json` text COLLATE utf8_unicode_ci NOT NULL,
`weibo_id` int(11) unsigned NOT NULL,
`weibo_token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`weibo_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`weibo_nickname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`weibo_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`weibo_avatar` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`weibo_json` text COLLATE utf8_unicode_ci NOT NULL,
`qq_id` int(11) NOT NULL,
`qq_token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`qq_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`qq_nickname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`qq_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`qq_avatar` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`qq_json` text COLLATE utf8_unicode_ci NOT NULL,
`weixin_id` int(11) NOT NULL,
`weixin_token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`weixin_name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`weixin_nickname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`weixin_email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`weixin_avatar` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`weixin_json` text COLLATE utf8_unicode_ci NOT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table votes
# ------------------------------------------------------------
CREATE TABLE `votes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`article_id` int(10) unsigned DEFAULT NULL,
`movie_id` int(10) unsigned DEFAULT NULL,
`show_id` int(10) unsigned DEFAULT NULL,
`visit` int(10) unsigned NOT NULL,
`favorate_count` int(10) unsigned DEFAULT NULL,
`score` decimal(4,2) NOT NULL,
`vote_count` int(10) unsigned NOT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`fake_read` int(10) unsigned DEFAULT NULL COMMENT '假浏览量',
PRIMARY KEY (`id`),
KEY `votes_article_id_index` (`article_id`),
KEY `votes_movie_id_index` (`movie_id`),
KEY `votes_show_id_index` (`show_id`),
CONSTRAINT `votes_article_id_foreign` FOREIGN KEY (`article_id`) REFERENCES `articles` (`id`) ON DELETE CASCADE,
CONSTRAINT `votes_movie_id_foreign` FOREIGN KEY (`movie_id`) REFERENCES `movies` (`id`) ON DELETE CASCADE,
CONSTRAINT `votes_show_id_foreign` FOREIGN KEY (`show_id`) REFERENCES `shows` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
# Dump of table weibos
# ------------------------------------------------------------
CREATE TABLE `weibos` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`wb_id` bigint(20) unsigned NOT NULL,
`body` text COLLATE utf8_unicode_ci NOT NULL,
`images` text COLLATE utf8_unicode_ci NOT NULL,
`type` enum('favorate','myself','friend','trash') COLLATE utf8_unicode_ci NOT NULL,
`is_shown` tinyint(3) unsigned NOT NULL,
`weibor` char(255) COLLATE utf8_unicode_ci NOT NULL,
`avatar` char(255) COLLATE utf8_unicode_ci NOT NULL,
`media_url` char(255) COLLATE utf8_unicode_ci NOT NULL,
`long_url` char(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`media_type` enum('miaopai','youku','bili','acfun','text','miaopai','xiakaxiu','vlook') COLLATE utf8_unicode_ci DEFAULT 'text',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `weibos_wb_id_unique` (`wb_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!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 */;