Give every model created/modified timestamps
TimeStampedModel goes on UUIDModel, so all 28 domain models get row birthdays in one place. Without them the dashboard can only ever describe the present: "42 members" is knowable, "members joined this month" is not, and no metric can show direction. Order dropped its own created/modified -- redeclaring a field from an abstract base is an error, and its column survives as a plain AlterField (verbose_name only), so no order data moves. Note for reading early charts: auto_now_add backfills existing rows with a single migration timestamp, so everything that predates this commit shares one birthday and will show up as a spike at that instant rather than as real history. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -142,8 +142,8 @@ class Order(ClubScopedModel):
|
||||
status = models.CharField(_("status"), max_length=255, choices=OrderStatus.choices, default=OrderStatus.PENDING)
|
||||
total = models.DecimalField(_("total"), max_digits=10, decimal_places=2)
|
||||
|
||||
created = models.DateTimeField(_("created at"), auto_now_add=True)
|
||||
modified = models.DateTimeField(_("modified"), auto_now=True)
|
||||
# `created`/`modified` come from TimeStampedModel — declaring them here as well
|
||||
# would clash with the abstract base.
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("order")
|
||||
|
||||
Reference in New Issue
Block a user