export type Term = '春' | '暑' | '秋' | '寒' export interface StudentProfile { id: string name: string grade: string subject: string academicYear: number term: Term guardianTitle: string startTime: string endTime: string createdAt: number updatedAt: number } export interface StudentProfileDefaults { grade: string subject: string lessonDurationMinutes: number } export interface StudentDraft { name: string grade: string subject: string academicYear: number term: Term guardianTitle: string startTime: string endTime: string } export interface FeedbackRecord { id: string profileId: string | null feedbackDate: string content: string createdAt: number updatedAt: number } export interface FeedbackDraft { profileId: string | null feedbackDate: string content: string feedbackSessionId?: string | null } export interface HealthStatus { status: string databaseConfigured: boolean speechConfigured: boolean speechAvailable: boolean speechProvider: string | null summaryConfigured: boolean wechatAuthConfigured: boolean developmentAuthEnabled: boolean } export type VoiceProcessingStatus = 'recording' | 'processing' | 'ready' | 'failed' export interface VoiceAudioSegment { id: string sequence: number durationMs: number status: 'processing' | 'ready' | 'failed' errorMessage: string | null } export interface VoiceLesson { id: string sequence: number status: VoiceProcessingStatus durationMs: number appliedDirectly: boolean includedInGeneration: boolean transcript: string segments: VoiceAudioSegment[] startedAt: number endedAt: number | null } export interface FeedbackSession { id: string profileId: string | null feedbackDate: string content: string status: 'active' | 'finalized' lessonCount: number totalDurationMs: number processingSegmentCount: number failedSegmentCount: number needsGeneration: boolean lessons: VoiceLesson[] latestSummaryRun: FeedbackSummaryRun | null createdAt: number updatedAt: number } export type FeedbackSummaryStatus = 'queued' | 'processing' | 'ready' | 'failed' | 'applied' export interface FeedbackSummaryRun { id: string feedbackSessionId: string lessonIds: string[] status: FeedbackSummaryStatus content: string | null method: string | null model: string | null promptVersion: string characterCount: number | null errorMessage: string | null attempts: number createdAt: number completedAt: number | null appliedAt: number | null } export interface VoiceLessonCreated { id: string sequence: number status: VoiceProcessingStatus startedAt: number } export interface VoiceLessonFinished { id: string status: VoiceProcessingStatus durationMs: number transcript: string canApplyDirectly: boolean } export interface GeneratedFeedback { content: string method: 'llm' | 'llm_hierarchical' | 'extractive' }