Skip to content

Commit

Permalink
feat: track customer creation timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Dec 18, 2024
1 parent cec2a29 commit 863c218
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 0 deletions.
26 changes: 26 additions & 0 deletions weblate_web/invoices/migrations/0017_alter_invoiceitem_package.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Generated by Django 5.1.3 on 2024-12-18 10:29

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("invoices", "0016_alter_invoice_category_and_more"),
("weblate_web", "0037_package_hidden"),
]

operations = [
migrations.AlterField(
model_name="invoiceitem",
name="package",
field=models.ForeignKey(
blank=True,
help_text="Selecting package will automatically fill in description and price",
limit_choices_to={"hidden": False},
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="weblate_web.package",
),
),
]
21 changes: 21 additions & 0 deletions weblate_web/payments/migrations/0041_customer_created.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 5.1.3 on 2024-12-18 10:29

import django.utils.timezone
from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("payments", "0040_fill_in_users"),
]

operations = [
migrations.AddField(
model_name="customer",
name="created",
field=models.DateTimeField(
auto_now_add=True, default=django.utils.timezone.now
),
preserve_default=False,
),
]
1 change: 1 addition & 0 deletions weblate_web/payments/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ class Customer(models.Model):
null=True,
)
users = models.ManyToManyField(User)
created = models.DateTimeField(auto_now_add=True)

objects = CustomerQuerySet.as_manager()

Expand Down

0 comments on commit 863c218

Please sign in to comment.