mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2026-01-02 03:27:02 -05:00
feat: Implement initial schema and add various API, service, and management command enhancements across the application.
This commit is contained in:
@@ -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"),
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user