From 26b0ddbd9929ef04f34444b863fe6702002e6c08 Mon Sep 17 00:00:00 2001 From: Laurent Date: Thu, 16 May 2024 16:59:58 +0200 Subject: [PATCH] Adds revocation date for Purchase --- .../0049_purchase_revocation_date.py | 18 ++++++++++++++++++ tournaments/models/purchase.py | 1 + 2 files changed, 19 insertions(+) create mode 100644 tournaments/migrations/0049_purchase_revocation_date.py diff --git a/tournaments/migrations/0049_purchase_revocation_date.py b/tournaments/migrations/0049_purchase_revocation_date.py new file mode 100644 index 0000000..a199339 --- /dev/null +++ b/tournaments/migrations/0049_purchase_revocation_date.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.11 on 2024-05-16 14:41 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('tournaments', '0048_remove_tournament_group_stage_court_count'), + ] + + operations = [ + migrations.AddField( + model_name='purchase', + name='revocation_date', + field=models.DateTimeField(blank=True, null=True), + ), + ] diff --git a/tournaments/models/purchase.py b/tournaments/models/purchase.py index c0a4d37..6dc72e4 100644 --- a/tournaments/models/purchase.py +++ b/tournaments/models/purchase.py @@ -9,6 +9,7 @@ class Purchase(models.Model): purchase_date = models.DateTimeField() product_id = models.CharField(max_length=100) quantity = models.IntegerField(null=True, blank=True) + revocation_date = models.DateTimeField(null=True, blank=True) def __str__(self): return f"{self.identifier} > {self.product_id} - {self.purchase_date} - {self.user.username}"