feat: Implement initial schema and add various API, service, and management command enhancements across the application.

This commit is contained in:
pacnpal
2026-01-01 15:13:01 -05:00
parent c95f99ca10
commit b243b17af7
413 changed files with 11164 additions and 17433 deletions

View File

@@ -40,12 +40,8 @@ class ParkReview(TrackedModel):
updated_at = models.DateTimeField(auto_now=True)
# Moderation
is_published = models.BooleanField(
default=True, help_text="Whether this review is publicly visible"
)
moderation_notes = models.TextField(
blank=True, help_text="Internal notes from moderators"
)
is_published = models.BooleanField(default=True, help_text="Whether this review is publicly visible")
moderation_notes = models.TextField(blank=True, help_text="Internal notes from moderators")
moderated_by = models.ForeignKey(
"accounts.User",
on_delete=models.SET_NULL,
@@ -54,9 +50,7 @@ class ParkReview(TrackedModel):
related_name="moderated_park_reviews",
help_text="Moderator who reviewed this",
)
moderated_at = models.DateTimeField(
null=True, blank=True, help_text="When this review was moderated"
)
moderated_at = models.DateTimeField(null=True, blank=True, help_text="When this review was moderated")
class Meta(TrackedModel.Meta):
verbose_name = "Park Review"
@@ -82,10 +76,7 @@ class ParkReview(TrackedModel):
name="park_review_moderation_consistency",
check=models.Q(moderated_by__isnull=True, moderated_at__isnull=True)
| models.Q(moderated_by__isnull=False, moderated_at__isnull=False),
violation_error_message=(
"Moderated reviews must have both moderator and moderation "
"timestamp"
),
violation_error_message=("Moderated reviews must have both moderator and moderation " "timestamp"),
),
]