1
+ # 条目收藏
2
+
1
3
https://github.com/bangumi/dev-env/blob/master/sql/schema/chii_subject_interests.sql
2
4
3
5
``` SQL
@@ -22,3 +24,39 @@ CREATE TABLE IF NOT EXISTS `chii_subject_interests` (
22
24
` interest_private` tinyint (1 ) unsigned NOT NULL
23
25
) ENGINE= InnoDB DEFAULT CHARSET= utf8;
24
26
```
27
+
28
+ # 章节收藏
29
+
30
+ https://github.com/bangumi/dev-env/blob/master/sql/schema/chii_ep_status.sql
31
+
32
+ ``` SQL
33
+ CREATE TABLE IF NOT EXISTS ` chii_ep_status` (
34
+ ` ep_stt_id` mediumint(8 ) unsigned NOT NULL ,
35
+ ` ep_stt_uid` mediumint(8 ) unsigned NOT NULL ,
36
+ ` ep_stt_sid` mediumint(8 ) unsigned NOT NULL ,
37
+ ` ep_stt_on_prg` tinyint (1 ) unsigned NOT NULL DEFAULT ' 0' ,
38
+ ` ep_stt_status` mediumtext NOT NULL ,
39
+ ` ep_stt_lasttouch` int (10 ) unsigned NOT NULL
40
+ ) ENGINE = MyISAM DEFAULT CHARSET = utf8;
41
+ ```
42
+
43
+ ` ep_stt_status ` 字段经过了 php 序列化。
44
+
45
+ 数据结构,解析后的数据结构大约如下:(使用 golang 表示)
46
+
47
+ ``` golang
48
+ type EpisodeID = uint32
49
+ type EpisodeCollectionType uint8
50
+
51
+ const (
52
+ EpisodeCollectionAll EpisodeCollectionType = 0 // 全部
53
+ EpisodeCollectionWish EpisodeCollectionType = 1 // 想看
54
+ EpisodeCollectionDone EpisodeCollectionType = 2 // 看过
55
+ EpisodeCollectionDropped EpisodeCollectionType = 3 // 抛弃
56
+ )
57
+
58
+ type EpStatus = map [EpisodeID]struct {
59
+ EpisodeID EpisodeID ` php:"eid,string"`
60
+ Type EpisodeCollectionType ` php:"type"`
61
+ }
62
+ ```
0 commit comments