- auth: actionDeleteAccount 改用 service+repo,forgot-password 完整三层实现 - card: serviceCheckCardOwnership 替代直接调用 repository - deck: 移除 service 层的 use server 指令 - dictionary: 数据转换逻辑从 repository 移到 service - ocr: 认证移到 action 层,跨模块调用改用 service - translator: genIPA/genLanguage 改用 service 层
59 lines
1.3 KiB
TypeScript
59 lines
1.3 KiB
TypeScript
export type RepoInputCreateDictionaryLookUp = {
|
|
userId?: string;
|
|
text: string;
|
|
queryLang: string;
|
|
definitionLang: string;
|
|
dictionaryItemId?: number;
|
|
};
|
|
|
|
export type RepoOutputSelectLastLookUpResultEntry = {
|
|
id: number;
|
|
itemId: number;
|
|
ipa: string | null;
|
|
definition: string;
|
|
partOfSpeech: string | null;
|
|
example: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
};
|
|
|
|
export type RepoOutputSelectLastLookUpResultItem = {
|
|
id: number;
|
|
frequency: number;
|
|
standardForm: string;
|
|
queryLang: string;
|
|
definitionLang: string;
|
|
createdAt: Date;
|
|
updatedAt: Date;
|
|
entries: RepoOutputSelectLastLookUpResultEntry[];
|
|
};
|
|
|
|
export type RepoOutputSelectLastLookUpResult = RepoOutputSelectLastLookUpResultItem | null;
|
|
|
|
export type RepoInputCreateDictionaryItem = {
|
|
standardForm: string;
|
|
queryLang: string;
|
|
definitionLang: string;
|
|
};
|
|
|
|
export type RepoInputCreateDictionaryEntry = {
|
|
itemId: number;
|
|
ipa?: string;
|
|
definition: string;
|
|
partOfSpeech?: string;
|
|
example: string;
|
|
};
|
|
|
|
export type RepoInputCreateDictionaryEntryWithoutItemId = {
|
|
ipa?: string;
|
|
definition: string;
|
|
partOfSpeech?: string;
|
|
example: string;
|
|
};
|
|
|
|
export type RepoInputSelectLastLookUpResult = {
|
|
text: string,
|
|
queryLang: string,
|
|
definitionLang: string;
|
|
};
|