feat: 增加本地测评档案与长期追踪
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
export interface AssessmentProfile {
|
||||
id: string;
|
||||
name: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface ScoreMetric {
|
||||
key: string;
|
||||
label: string;
|
||||
value: number;
|
||||
max?: number;
|
||||
level?: string;
|
||||
}
|
||||
|
||||
export interface ScoreSummary {
|
||||
primary?: ScoreMetric;
|
||||
metrics: ScoreMetric[];
|
||||
note?: string;
|
||||
}
|
||||
|
||||
export interface RecordedAnswer {
|
||||
questionId: number;
|
||||
question: string;
|
||||
value: string;
|
||||
answer: string;
|
||||
}
|
||||
|
||||
export interface AssessmentRecord {
|
||||
id: string;
|
||||
profileId: string;
|
||||
questionnaireId: string;
|
||||
questionnaireTitle: string;
|
||||
category: string;
|
||||
completedAt: string;
|
||||
answers: RecordedAnswer[];
|
||||
scoreSummary: ScoreSummary;
|
||||
analysisText?: string;
|
||||
retestSuitable?: boolean;
|
||||
recommendedInterval?: '1年' | '3个月' | '一次即可';
|
||||
}
|
||||
|
||||
export interface EncryptedMindScopeBackup {
|
||||
format: 'mindscope-encrypted-backup';
|
||||
version: 1;
|
||||
algorithm: 'AES-GCM';
|
||||
iterations: number;
|
||||
salt: string;
|
||||
iv: string;
|
||||
data: string;
|
||||
}
|
||||
|
||||
export interface MindScopeBackup {
|
||||
format: 'mindscope-backup';
|
||||
version: 1;
|
||||
exportedAt: string;
|
||||
profiles: AssessmentProfile[];
|
||||
records: AssessmentRecord[];
|
||||
}
|
||||
Reference in New Issue
Block a user