Adds revocation date for Purchase

clubs
Laurent 2 years ago
parent 618eaf1f1d
commit 26b0ddbd99
  1. 18
      tournaments/migrations/0049_purchase_revocation_date.py
  2. 1
      tournaments/models/purchase.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),
),
]

@ -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}"

Loading…
Cancel
Save