diff --git a/osinaweb/billing/__pycache__/models.cpython-310.pyc b/osinaweb/billing/__pycache__/models.cpython-310.pyc index da952b3b..777f410d 100644 Binary files a/osinaweb/billing/__pycache__/models.cpython-310.pyc and b/osinaweb/billing/__pycache__/models.cpython-310.pyc differ diff --git a/osinaweb/billing/migrations/0022_remove_item_cancelled_at_remove_item_created_at_and_more.py b/osinaweb/billing/migrations/0022_remove_item_cancelled_at_remove_item_created_at_and_more.py new file mode 100644 index 00000000..29621746 --- /dev/null +++ b/osinaweb/billing/migrations/0022_remove_item_cancelled_at_remove_item_created_at_and_more.py @@ -0,0 +1,31 @@ +# Generated by Django 4.2.5 on 2024-04-10 10:57 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('billing', '0021_remove_item_recurring_cycle_and_more'), + ] + + operations = [ + migrations.RemoveField( + model_name='item', + name='cancelled_at', + ), + migrations.RemoveField( + model_name='item', + name='created_at', + ), + migrations.AddField( + model_name='orderitem', + name='due_at', + field=models.DateField(blank=True, null=True), + ), + migrations.AddField( + model_name='orderitem', + name='purchased_at', + field=models.DateField(blank=True, null=True), + ), + ] diff --git a/osinaweb/billing/migrations/__pycache__/0022_remove_item_cancelled_at_remove_item_created_at_and_more.cpython-310.pyc b/osinaweb/billing/migrations/__pycache__/0022_remove_item_cancelled_at_remove_item_created_at_and_more.cpython-310.pyc new file mode 100644 index 00000000..1ca79d5e Binary files /dev/null and b/osinaweb/billing/migrations/__pycache__/0022_remove_item_cancelled_at_remove_item_created_at_and_more.cpython-310.pyc differ diff --git a/osinaweb/billing/models.py b/osinaweb/billing/models.py index 12065f13..f995c524 100644 --- a/osinaweb/billing/models.py +++ b/osinaweb/billing/models.py @@ -21,8 +21,6 @@ class Item(models.Model): type = models.ForeignKey(ProjectType, on_delete=models.CASCADE, blank=True) amount = models.FloatField(null=True) recurring = models.BooleanField(default=False) - created_at = models.DateField(null=True, blank=True) - cancelled_at = models.DateField(blank=True, null=True) active = models.BooleanField(default=True, null=True) def __str__(self): return self.title @@ -51,6 +49,8 @@ class Order(models.Model): class OrderItem(models.Model): order = models.ForeignKey(Order, on_delete=models.CASCADE) item = models.ForeignKey(Item, on_delete=models.CASCADE) + purchased_at = models.DateField(null=True, blank=True) + due_at = models.DateField(blank=True, null=True) recurring_cycle = models.ForeignKey(RecurringCycle, on_delete=models.SET_NULL, null=True, blank=True) diff --git a/osinaweb/db.sqlite3 b/osinaweb/db.sqlite3 index 088ee345..4f2c84fd 100644 Binary files a/osinaweb/db.sqlite3 and b/osinaweb/db.sqlite3 differ