Reapply "Adminbereich mit Rollen und Nutzerauswertung ergänzen"
This reverts commit 2447537652.
This commit is contained in:
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user