843 B
843 B
Task: Social Features (Comments & Ratings)
Objective
Implement social interaction layers allowing users to comment on and rate content.
Steps
- Database Schema:
- Create
Commentmodel (user_id, content, timestamp, foreign keys to Show/Song/Venue). - Create
Ratingmodel (user_id, score, foreign keys).
- Create
- API Endpoints:
- POST /comments/ (Create comment)
- GET /comments/{entity_type}/{entity_id} (List comments)
- POST /ratings/ (Rate an item)
- GET /ratings/average/{entity_type}/{entity_id} (Get average score)
- Frontend:
- Create
CommentSectioncomponent. - Create
StarRatingcomponent. - Integrate into Show Detail page.
- Create
Acceptance Criteria
- Users can leave comments on a Show.
- Users can rate a Show.
- Average rating is displayed.