初步-> 架构设计,字段存储结构设计,代码框架实现.

This commit is contained in:
eson
2020-07-06 16:33:35 +08:00
commit ae56d86026
13 changed files with 5463 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
create database if not exists `intimate_extractor`;
use intimate_extractor;
CREATE TABLE IF NOT EXISTS `anchor_info` (
`platform` varchar(255) NOT NULL,
`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 (`platform`, `anchor_name`),
KEY `channel_idx` (`channel`),
KEY `show_type_idx` (`show_type`),
KEY `update_time_idx` (`update_time`)
);
CREATE TABLE IF NOT EXISTS `show_log` (
`platform` varchar(255) NOT NULL,
`anchor_name` varchar(255) NOT NULL,
`is_showing` tinyint(1) DEFAULT NULL,
`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,
KEY `platform_idx` (`platform`),
KEY `anchor_name_idx` (`anchor_name`),
KEY `is_showing_idx` (`is_showing`),
KEY `followers_idx` (`followers`),
KEY `views_idx` (`views`),
KEY `gratuity_idx` (`gratuity`),
KEY `update_time_idx` (`update_time`)
)

12
sql/intimate_source.sql Normal file
View File

@@ -0,0 +1,12 @@
create database if not exists `intimate_source`;
use intimate_source;
CREATE TABLE IF NOT EXISTS `platform_openrec` (
`url` text NOT NULL,
`target_type` varchar(64) NOT NULL,
`source` longtext DEFAULT NULL,
`ext` json DEFAULT NULL,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
KEY `update_time_idx` (`update_time`),
KEY `target_type_idx` (`target_type`)
);