https://github.com/bangumi/dev-env/blob/master/sql/schema/chii_subject_interests.sql
CREATE TABLE IF NOT EXISTS `chii_subject_interests` (
`interest_id` int(10) unsigned NOT NULL,
`interest_uid` mediumint(8) unsigned NOT NULL,
`interest_subject_id` mediumint(8) unsigned NOT NULL,
`interest_subject_type` smallint(6) unsigned NOT NULL DEFAULT '0',
`interest_rate` tinyint(3) unsigned NOT NULL DEFAULT '0',
`interest_type` tinyint(1) unsigned NOT NULL DEFAULT '0',
`interest_has_comment` tinyint(1) unsigned NOT NULL,
`interest_comment` mediumtext NOT NULL,
`interest_tag` mediumtext NOT NULL,
`interest_ep_status` mediumint(8) unsigned NOT NULL DEFAULT '0',
`interest_vol_status` mediumint(8) unsigned NOT NULL COMMENT '卷数',
`interest_wish_dateline` int(10) unsigned NOT NULL,
`interest_doing_dateline` int(10) unsigned NOT NULL,
`interest_collect_dateline` int(10) unsigned NOT NULL,
`interest_on_hold_dateline` int(10) unsigned NOT NULL,
`interest_dropped_dateline` int(10) unsigned NOT NULL,
`interest_lasttouch` int(10) unsigned NOT NULL DEFAULT '0',
`interest_private` tinyint(1) unsigned NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
https://github.com/bangumi/dev-env/blob/master/sql/schema/chii_ep_status.sql
CREATE TABLE IF NOT EXISTS `chii_ep_status` (
`ep_stt_id` mediumint(8) unsigned NOT NULL,
`ep_stt_uid` mediumint(8) unsigned NOT NULL,
`ep_stt_sid` mediumint(8) unsigned NOT NULL,
`ep_stt_on_prg` tinyint(1) unsigned NOT NULL DEFAULT '0',
`ep_stt_status` mediumtext NOT NULL,
`ep_stt_lasttouch` int(10) unsigned NOT NULL
) ENGINE = MyISAM DEFAULT CHARSET = utf8;
ep_stt_status
字段经过了 php 序列化。
数据结构,解析后的数据结构大约如下:(使用 TypeScript 表示)
type EpisodeID = number
enum EpisodeCollectionType {
watched = 1, // 想看
done = 2, // 看过
dropped = 3, // 抛弃
}
type EpStatus = {
[episode_id: EpisodeID]: {
eid: string // EpisodeID in string
stat: EpisodeCollectionType
}
}