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

View File

@@ -61,13 +61,14 @@ INSTALLED_APPS = [
'channels',
'storages',
'defender',
'pgtrigger',
'pghistory',
# Local apps
'apps.core',
'apps.users',
'apps.entities',
'apps.moderation',
'apps.versioning',
'apps.media',
'apps.notifications',
'apps.reviews',