新增电子书架

This commit is contained in:
mtvpls
2026-04-29 02:24:29 +08:00
parent 6d9afd8072
commit 0d99953e99
38 changed files with 3826 additions and 6 deletions
+14
View File
@@ -1,5 +1,6 @@
import { AdminConfig } from './admin.types';
import { MangaReadRecord, MangaShelfItem } from './manga.types';
import { BookReadRecord, BookShelfItem } from './book.types';
// 播放记录数据结构
export interface PlayRecord {
@@ -89,6 +90,19 @@ export interface IStorage {
deleteMangaReadRecord(userName: string, key: string): Promise<void>;
cleanupOldMangaReadRecords?(userName: string): Promise<void>;
// 电子书书架相关
getBookShelf(userName: string, key: string): Promise<BookShelfItem | null>;
setBookShelf(userName: string, key: string, item: BookShelfItem): Promise<void>;
getAllBookShelf(userName: string): Promise<{ [key: string]: BookShelfItem }>;
deleteBookShelf(userName: string, key: string): Promise<void>;
// 电子书阅读历史相关
getBookReadRecord(userName: string, key: string): Promise<BookReadRecord | null>;
setBookReadRecord(userName: string, key: string, record: BookReadRecord): Promise<void>;
getAllBookReadRecords(userName: string): Promise<{ [key: string]: BookReadRecord }>;
deleteBookReadRecord(userName: string, key: string): Promise<void>;
cleanupOldBookReadRecords?(userName: string): Promise<void>;
// 用户列表
getAllUsers(): Promise<string[]>;