feat: Implement MFA authentication, add ride statistics model, and update various services, APIs, and tests across the application.

This commit is contained in:
pacnpal
2025-12-28 17:32:53 -05:00
parent aa56c46c27
commit c95f99ca10
452 changed files with 7948 additions and 6073 deletions

View File

@@ -1,9 +1,11 @@
from django.db import models
import pghistory
from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from apps.core.history import TrackedModel
import pghistory
@pghistory.track()
class Review(TrackedModel):
@@ -13,7 +15,7 @@ class Review(TrackedModel):
related_name="reviews",
help_text="User who wrote the review",
)
# Generic relation to target object (Park, Ride, etc.)
content_type = models.ForeignKey(
ContentType,
@@ -30,14 +32,14 @@ class Review(TrackedModel):
db_index=True,
)
text = models.TextField(blank=True, help_text="Review text (optional)")
# Metadata
is_public = models.BooleanField(
default=True,
default=True,
help_text="Whether this review is visible to others"
)
helpful_votes = models.PositiveIntegerField(
default=0,
default=0,
help_text="Number of users who found this helpful"
)