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
| create table videos ( id bigint auto_increment primary key, title varchar(191) default '' not null comment '影片标题', category_pid bigint default 0 not null comment '分类一级id', category_child_id bigint default 0 not null comment '分类二级id', surface_plot text null comment '影片封面图', recommend bigint default 2 not null comment '是否推荐 1是 2否', cycle bigint default 2 not null comment '是否轮播 1是 2否', cycle_img text null comment '轮播图片', charging_mode bigint default 0 not null comment '收费模式 1免费 2vip免费 3金币点播', buy_mode bigint default 1 not null comment '购买模式 1按部 2按集', gold bigint default 0 not null comment '金币点播值', directors text null comment '导演', actors text null comment '演员', imdb_score bigint not null comment 'imd评分.百分制', imdb_score_id varchar(256) default '' not null comment 'imd评分ID', douban_score bigint not null comment '豆瓣评分.百分制', douban_score_id varchar(256) default '' not null comment '豆瓣评分ID', introduce text null comment '简介', popularity_day bigint not null comment '日人气', popularity_week bigint not null comment '周人气', popularity_month bigint not null comment '月人气', popularity_sum bigint not null comment '总人气', note varchar(256) not null comment '连载状态', year varchar(256) not null comment '年份', album_id bigint not null comment '关联专题id', status bigint not null comment '状态', create_at bigint not null, update_at bigint not null, duration bigint default 0 not null comment '时长(单位s)', region varchar(256) default '' not null comment '自定义地区', language varchar(256) default '' not null comment '自定义语言', label varchar(256) default '' not null comment '自定义标签', number bigint null comment '总集数', total bigint null comment '更新集数', horizontal_poster text null comment '横屏海报', vertical_poster text null comment '竖屏海报', publish text null comment '发行商', serial_number text null comment '序列号', screenshot text null comment '截屏', gif text null, alias text null, release_at bigint null, shelf_at bigint default 0 not null, end tinyint(1) null, unit varchar(32) null, watch bigint null, collection_id bigint null, use_local_image tinyint(1) null, titles_time int default 0 not null comment '片头时间', trailer_time int default 0 not null comment '片尾时间', site_id int default 1 not null comment '站点id', category_pid_status int default 1 not null comment '顶级分类状态', category_child_id_status int default 1 not null comment '子级分类状态', play_url longtext null comment '采集的源地址', play_url_put_in int default 0 not null comment '播放地址是否入库1-已经入库', constraint videos_spct_uidx unique (site_id, category_pid, category_child_id, title) ) collate = utf8mb4_unicode_ci;
create index idx_videos_shelfAt on videos (site_id, shelf_at);
create index idx_videos_siteID_pid_cid on videos (site_id, category_pid, category_child_id);
create index idx_videos_siteID_title on videos (site_id, title);
create index videos_cycle_index on videos (site_id, cycle, recommend, shelf_at);
create index videos_recommend_query_index on videos (site_id, recommend, shelf_at);
create index videos_release_at_index on videos (release_at);
create index videos_scs_index on videos (site_id, category_child_id, shelf_at);
create index videos_shelfat_query_index on videos (site_id, category_pid, shelf_at);
create index videos_watch_query_index on videos (site_id, category_pid, watch);
|