refactor: 完全重构为 Anki 兼容数据结构
- 用 Deck 替换 Folder - 用 Note + Card 替换 Pair (双向复习) - 添加 NoteType (卡片模板) - 添加 Revlog (复习历史) - 实现 SM-2 间隔重复算法 - 更新所有前端页面 - 添加数据库迁移
This commit is contained in:
60
src/modules/note/note-service-dto.ts
Normal file
60
src/modules/note/note-service-dto.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
export type ServiceInputCreateNote = {
|
||||
noteTypeId: number;
|
||||
fields: string[];
|
||||
tags?: string[];
|
||||
userId: string;
|
||||
};
|
||||
|
||||
export type ServiceInputUpdateNote = {
|
||||
noteId: bigint;
|
||||
fields?: string[];
|
||||
tags?: string[];
|
||||
userId: string;
|
||||
};
|
||||
|
||||
export type ServiceInputDeleteNote = {
|
||||
noteId: bigint;
|
||||
userId: string;
|
||||
};
|
||||
|
||||
export type ServiceInputGetNoteById = {
|
||||
noteId: bigint;
|
||||
};
|
||||
|
||||
export type ServiceInputGetNotesByNoteTypeId = {
|
||||
noteTypeId: number;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
};
|
||||
|
||||
export type ServiceInputGetNotesByUserId = {
|
||||
userId: string;
|
||||
limit?: number;
|
||||
offset?: number;
|
||||
};
|
||||
|
||||
export type ServiceOutputNote = {
|
||||
id: bigint;
|
||||
guid: string;
|
||||
noteTypeId: number;
|
||||
mod: number;
|
||||
usn: number;
|
||||
tags: string[];
|
||||
fields: string[];
|
||||
sfld: string;
|
||||
csum: number;
|
||||
flags: number;
|
||||
data: string;
|
||||
userId: string;
|
||||
createdAt: Date;
|
||||
updatedAt: Date;
|
||||
};
|
||||
|
||||
export type ServiceOutputCreateNote = {
|
||||
id: bigint;
|
||||
guid: string;
|
||||
};
|
||||
|
||||
export type ServiceOutputNoteCount = {
|
||||
count: number;
|
||||
};
|
||||
Reference in New Issue
Block a user