Professional Documents
Culture Documents
Solution
Solution
Solution
1. User Table:
- Columns:
- ID (Primary key)
- Name
2. Concern Table:
- Columns:
- ID (Primary key)
- Name
4. Content Table:
- Columns:
- ID (Primary key)
- Concern_ID (Foreign key referencing the Concern Table's ID)
- Content details (e.g., text, image URL, etc.)
1. GET /users:
2. GET /users/{user_id}/concerns:
Description: Retrieve the list of concerns for a specific user.
Backend logic: Query the User_Concern table to fetch all concern records
associated with the given user ID.
Response: Return a JSON array containing concern objects with their IDs
and names.
3. GET /concerns:
4. GET /concerns/{concern_id}/content:
5. POST /users/{user_id}/concerns:
6. POST /users/{user_id}/concerns/{concern_id}/content: