- 用 Deck 替换 Folder - 用 Note + Card 替换 Pair (双向复习) - 添加 NoteType (卡片模板) - 添加 Revlog (复习历史) - 实现 SM-2 间隔重复算法 - 更新所有前端页面 - 添加数据库迁移
61 lines
1010 B
TypeScript
61 lines
1010 B
TypeScript
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;
|
|
};
|