feat: add gamification features for users, including XP and leveling, with corresponding database schema and API response updates.

This commit is contained in:
2026-01-04 21:40:21 -03:00
parent 6326cad39d
commit a19da8de76
6 changed files with 181 additions and 101 deletions
+4
View File
@@ -122,6 +122,8 @@ pub struct User {
pub password_hash: String,
pub full_name: String,
pub role: String, // admin, instructor, student
pub xp: i32,
pub level: i32,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
}
@@ -133,6 +135,8 @@ pub struct UserResponse {
pub full_name: String,
pub role: String,
pub organization_id: Uuid,
pub xp: i32,
pub level: i32,
}
#[derive(Debug, Serialize, Deserialize, sqlx::FromRow, Clone)]