Add ReviewEvent model and ReviewSubmissionService for review management

- Created a new ReviewEvent model to track review events with fields for content, rating, moderation status, and timestamps.
- Added ForeignKey relationships to connect ReviewEvent with ContentSubmission, User, and Review.
- Implemented ReviewSubmissionService to handle review submissions, including creation, updates, and moderation workflows.
- Introduced atomic transactions to ensure data integrity during review submissions and updates.
- Added logging for review submission and moderation actions for better traceability.
- Implemented validation to prevent duplicate reviews and ensure only the review owner can update their review.
This commit is contained in:
pacnpal
2025-11-08 16:49:58 -05:00
parent 618310a87b
commit 9122320e7e
18 changed files with 3170 additions and 171 deletions

56
.gitignore vendored
View File

@@ -25,4 +25,58 @@ dist-ssr
.snapshots/config.json
.snapshots/sponsors.md
.snapshots/
context_portal
context_portal
# Django
*.pyc
__pycache__/
*.py[cod]
*$py.class
# Django database
*.sqlite3
*.db
db.sqlite3
# Django static files
/django/staticfiles/
/django/static/
# Django media files
/django/media/
# Django migrations (keep the files, ignore bytecode)
**/migrations/__pycache__/
# Python virtual environment
/django/venv/
/django/env/
/django/.venv/
*.env
!.env.example
# Django local settings
/django/config/settings/local_override.py
# Celery
celerybeat-schedule
celerybeat.pid
# Coverage reports
htmlcov/
.coverage
.coverage.*
.pytest_cache/
.tox/
# IDE
*.swp
*.swo
*~
.project
.pydevproject
.settings/
# OS files
.DS_Store
Thumbs.db