Initial commit
This commit is contained in:
@@ -0,0 +1,134 @@
|
||||
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"`
|
||||
}
|
||||
|
||||
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 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"`
|
||||
}
|
||||
Reference in New Issue
Block a user