refactor: 修复 modules 三层架构违规
- auth: actionDeleteAccount 改用 service+repo,forgot-password 完整三层实现 - card: serviceCheckCardOwnership 替代直接调用 repository - deck: 移除 service 层的 use server 指令 - dictionary: 数据转换逻辑从 repository 移到 service - ocr: 认证移到 action 层,跨模块调用改用 service - translator: genIPA/genLanguage 改用 service 层
This commit is contained in:
@@ -34,6 +34,13 @@ export interface ServiceInputGetCardStats {
|
||||
deckId: number;
|
||||
}
|
||||
|
||||
export interface ServiceInputCheckCardOwnership {
|
||||
cardId: bigint;
|
||||
userId: string;
|
||||
}
|
||||
|
||||
export type ServiceOutputCheckCardOwnership = boolean;
|
||||
|
||||
export type ServiceOutputCard = {
|
||||
id: bigint;
|
||||
noteId: bigint;
|
||||
@@ -94,11 +101,17 @@ export type ServiceOutputReviewResult = {
|
||||
|
||||
export const SM2_CONFIG = {
|
||||
LEARNING_STEPS: [1, 10],
|
||||
RELEARNING_STEPS: [10],
|
||||
GRADUATING_INTERVAL_GOOD: 1,
|
||||
GRADUATING_INTERVAL_EASY: 4,
|
||||
EASY_INTERVAL: 4,
|
||||
MINIMUM_FACTOR: 1300,
|
||||
DEFAULT_FACTOR: 2500,
|
||||
MAXIMUM_INTERVAL: 36500,
|
||||
EASY_BONUS: 1.3,
|
||||
HARD_INTERVAL: 1.2,
|
||||
NEW_INTERVAL: 0.0,
|
||||
INTERVAL_MODIFIER: 1.0,
|
||||
FACTOR_ADJUSTMENTS: {
|
||||
1: -200,
|
||||
2: -150,
|
||||
|
||||
Reference in New Issue
Block a user