Adminbereich mit Rollen und Nutzerauswertung ergänzen

Admin-API serverseitig absichern, Kennzahlen und paginierte Nutzersuche bereitstellen, Weboberfläche ergänzen und Einrichtung sowie spätere Kauf-Funktionen dokumentieren.
This commit is contained in:
Eugenius Naumenko
2026-10-10 18:45:52 +00:00
parent 82d8768a99
commit e432943ea7
14 changed files with 634 additions and 18 deletions
+25
View File
@@ -6,9 +6,34 @@ type User struct {
ID string `json:"id"`
Email string `json:"email"`
UILanguage string `json:"ui_language"`
Role string `json:"role"`
CreatedAt time.Time `json:"created_at"`
}
type AdminOverview struct {
UsersTotal int `json:"users_total"`
UsersActive7Days int `json:"users_active_7_days"`
AttemptsTotal int `json:"attempts_total"`
ExercisesGenerated int `json:"exercises_generated"`
AverageScore float64 `json:"average_score"`
}
type AdminUser struct {
ID string `json:"id"`
Email string `json:"email"`
Role string `json:"role"`
CreatedAt time.Time `json:"created_at"`
Attempts int `json:"attempts"`
AverageScore float64 `json:"average_score"`
LastAttempt *time.Time `json:"last_attempt,omitempty"`
}
type AdminUserPage struct {
Users []AdminUser `json:"users"`
Total int `json:"total"`
Page int `json:"page"`
}
type LearnerProfile struct {
ID string `json:"id"`
UserID string `json:"user_id"`