任务
This commit is contained in:
11
tasks/task_005.txt
Normal file
11
tasks/task_005.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
# Task ID: 5
|
||||
# Title: User Profile & Data Models (Server & DB)
|
||||
# Status: pending
|
||||
# Dependencies: 2, 4
|
||||
# Priority: high
|
||||
# Description: Define and implement the server-side data models and APIs for user profiles, including nickname, avatar, level, experience, and basic game statistics. This task focuses on persistent storage and retrieval of user data.
|
||||
# Details:
|
||||
Update MongoDB User model to include `level`, `experience`, `rank`, `stats` (totalGames, wins, winRate, currentStreak, maxStreak), and `achievements`. Implement API endpoints for fetching and updating user profiles. Ensure data consistency and validation.
|
||||
|
||||
# Test Strategy:
|
||||
Create/update user profiles via API. Verify data is correctly stored in MongoDB and retrieved. Test edge cases for stats updates (e.g., first game, win/loss).
|
||||
Reference in New Issue
Block a user