package domain import "time" type User struct { ID string `json:"id"` Email string `json:"email"` UILanguage string `json:"ui_language"` CreatedAt time.Time `json:"created_at"` } type LearnerProfile struct { ID string `json:"id"` UserID string `json:"user_id"` TargetLanguage string `json:"target_language"` CEFRLevel string `json:"cefr_level"` DailyGoalMinutes int `json:"daily_goal_minutes"` CreatedAt time.Time `json:"created_at"` } type LanguageProfile struct { Code string `json:"code"` DisplayName string `json:"display_name"` AzureLocale string `json:"azure_locale"` DefaultTTSVoice string `json:"default_tts_voice"` Voices []string `json:"voices"` SupportsPronunciationAssessment bool `json:"supports_pronunciation_assessment"` SupportsProsody bool `json:"supports_prosody"` } type Lesson struct { ID string `json:"id"` TargetLanguage string `json:"target_language"` CEFRLevel string `json:"cefr_level"` Topic string `json:"topic"` Title string `json:"title"` } type Exercise struct { ID string `json:"id"` LessonID string `json:"lesson_id"` TargetLanguage string `json:"target_language"` CEFRLevel string `json:"cefr_level"` Type string `json:"type"` PromptText string `json:"prompt_text"` TargetText string `json:"target_text"` Difficulty int `json:"difficulty"` Source string `json:"source,omitempty"` } type WordScore struct { Word string `json:"word"` Accuracy float64 `json:"accuracy"` ErrorType string `json:"error_type,omitempty"` Phonemes []string `json:"phonemes,omitempty"` Highlight string `json:"highlight"` } type PronunciationResult struct { RecognizedText string `json:"recognized_text"` OverallScore float64 `json:"overall_score"` AccuracyScore float64 `json:"accuracy_score"` FluencyScore float64 `json:"fluency_score"` CompletenessScore float64 `json:"completeness_score"` ProsodyScore float64 `json:"prosody_score"` WordScores []WordScore `json:"word_scores"` Provider string `json:"provider"` } type Attempt struct { ID string `json:"id"` UserID string `json:"user_id"` ExerciseID string `json:"exercise_id"` TargetLanguage string `json:"target_language"` RecognizedText string `json:"recognized_text"` OverallScore float64 `json:"overall_score"` AccuracyScore float64 `json:"accuracy_score"` FluencyScore float64 `json:"fluency_score"` CompletenessScore float64 `json:"completeness_score"` ProsodyScore float64 `json:"prosody_score"` WordScores []WordScore `json:"word_scores"` TeacherFeedback string `json:"teacher_feedback"` CreatedAt time.Time `json:"created_at"` } type ProgressSummary struct { TotalAttempts int `json:"total_attempts"` AverageScore float64 `json:"average_score"` WeakWords []WordScore `json:"weak_words"` RecentAttempts []Attempt `json:"recent_attempts"` DailyGoalMinutes int `json:"daily_goal_minutes"` } type GeneratedExerciseRequest struct { UserID string `json:"user_id"` Profile LearnerProfile `json:"profile"` Progress ProgressSummary `json:"progress"` TargetLanguage string `json:"target_language"` CEFRLevel string `json:"cefr_level"` UILanguage string `json:"ui_language"` SessionID string `json:"session_id"` RecentWeakWords []WordScore `json:"recent_weak_words"` PreferredType string `json:"preferred_type"` } type GeneratedExercise struct { ID string `json:"exercise_id"` ExerciseType string `json:"exercise_type"` TargetLanguage string `json:"target_language"` CEFRLevel string `json:"cefr_level"` ReferenceText string `json:"reference_text"` DisplayPrompt string `json:"display_prompt"` TTSText string `json:"tts_text"` FocusPoints []string `json:"focus_points"` SuccessCriteria []string `json:"success_criteria"` ReasonForChoice string `json:"reason_for_choice"` Source string `json:"source"` } type Dashboard struct { User User `json:"user"` Profile LearnerProfile `json:"profile"` Progress ProgressSummary `json:"progress"` NextLesson Lesson `json:"next_lesson"` NextExercise Exercise `json:"next_exercise"` } type ConversationSession struct { ID string `json:"id"` UserID string `json:"user_id"` TargetLanguage string `json:"target_language"` CEFRLevel string `json:"cefr_level"` Status string `json:"status"` CreatedAt time.Time `json:"created_at"` } type ConversationTurn struct { ID string `json:"id"` SessionID string `json:"session_id"` Speaker string `json:"speaker"` Text string `json:"text"` AttemptID string `json:"attempt_id,omitempty"` CreatedAt time.Time `json:"created_at"` } type TeacherResponse struct { ExerciseType string `json:"exercise_type"` TargetText string `json:"target_text"` TeacherFeedback string `json:"teacher_feedback"` TTSText string `json:"tts_text"` SSML string `json:"ssml"` NextRecommendation string `json:"next_recommendation"` } type DebugDBStatus struct { OK bool `json:"ok"` Counts map[string]int `json:"counts"` SeedLanguageCount int `json:"seed_language_count"` SeedExerciseCount int `json:"seed_exercise_count"` Error string `json:"error,omitempty"` }