2020-07-06 08:33:35 +00:00
|
|
|
create database if not exists `intimate_extractor`;
|
|
|
|
use intimate_extractor;
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `anchor_info` (
|
2020-07-07 08:17:05 +00:00
|
|
|
`uid` varchar(36) NOT NULL,
|
|
|
|
`platform` varchar(255) NOT NULL,
|
2020-07-08 02:11:35 +00:00
|
|
|
`anchor_id` varchar(255) NOT NULL,
|
2020-07-07 08:17:05 +00:00
|
|
|
`anchor_name` varchar(255) NOT NULL,
|
|
|
|
`platform_url` text NOT NULL,
|
|
|
|
`channel` varchar(128) DEFAULT NULL,
|
|
|
|
`show_type` varchar(255) DEFAULT NULL,
|
|
|
|
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
|
|
PRIMARY KEY (`uid`),
|
|
|
|
KEY `platform_idx` (`platform`),
|
2020-07-08 02:11:35 +00:00
|
|
|
KEY `anchor_id_idx` (`anchor_id`),
|
2020-07-07 08:17:05 +00:00
|
|
|
KEY `anchor_name_idx` (`anchor_name`),
|
2020-07-06 08:33:35 +00:00
|
|
|
KEY `channel_idx` (`channel`),
|
|
|
|
KEY `show_type_idx` (`show_type`),
|
|
|
|
KEY `update_time_idx` (`update_time`)
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `show_log` (
|
2020-07-07 08:17:05 +00:00
|
|
|
`uid` varchar(36) NOT NULL,
|
2020-07-06 08:33:35 +00:00
|
|
|
`platform` varchar(255) NOT NULL,
|
2020-07-08 02:11:35 +00:00
|
|
|
`anchor_id` varchar(255) NOT NULL,
|
2020-07-06 08:33:35 +00:00
|
|
|
|
|
|
|
`is_showing` tinyint(1) DEFAULT NULL,
|
2020-07-07 08:17:05 +00:00
|
|
|
`is_error` tinyint(1) DEFAULT NULL,
|
|
|
|
|
2020-07-06 08:33:35 +00:00
|
|
|
`followers` int(11) DEFAULT NULL,
|
|
|
|
`views` int(11) DEFAULT NULL,
|
|
|
|
`giver` json DEFAULT NULL,
|
|
|
|
`gratuity` int(11) DEFAULT NULL,
|
|
|
|
|
|
|
|
`show_title` text DEFAULT NULL,
|
|
|
|
`show_start_time` timestamp NULL DEFAULT NULL,
|
|
|
|
`show_end_time` timestamp NULL DEFAULT NULL,
|
|
|
|
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
|
|
`ext` json DEFAULT NULL,
|
2020-07-07 08:17:05 +00:00
|
|
|
|
|
|
|
`error` text DEFAULT NULL,
|
2020-07-06 08:33:35 +00:00
|
|
|
|
2020-07-07 08:17:05 +00:00
|
|
|
KEY `uid_idx` (`uid`),
|
2020-07-06 08:33:35 +00:00
|
|
|
KEY `platform_idx` (`platform`),
|
2020-07-08 02:11:35 +00:00
|
|
|
KEY `anchor_id_idx` (`anchor_id`),
|
2020-07-06 08:33:35 +00:00
|
|
|
KEY `is_showing_idx` (`is_showing`),
|
2020-07-07 08:17:05 +00:00
|
|
|
KEY `is_error_idx` (`is_error`),
|
2020-07-06 08:33:35 +00:00
|
|
|
KEY `followers_idx` (`followers`),
|
|
|
|
KEY `views_idx` (`views`),
|
|
|
|
KEY `gratuity_idx` (`gratuity`),
|
|
|
|
KEY `update_time_idx` (`update_time`)
|
|
|
|
)
|