diff --git a/server/vbv_lernwelt/shop/migrations/0009_alter_checkoutinformation_product_price.py b/server/vbv_lernwelt/shop/migrations/0009_alter_checkoutinformation_product_price.py new file mode 100644 index 00000000..b435d14b --- /dev/null +++ b/server/vbv_lernwelt/shop/migrations/0009_alter_checkoutinformation_product_price.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.20 on 2023-11-17 13:53 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('shop', '0008_auto_20231117_0905'), + ] + + operations = [ + migrations.AlterField( + model_name='checkoutinformation', + name='product_price', + field=models.IntegerField(help_text='The total price of the product in centimes -> 1000 = 10.00 CHF'), + ), + ] diff --git a/server/vbv_lernwelt/shop/models.py b/server/vbv_lernwelt/shop/models.py index 5919435b..f577b13a 100644 --- a/server/vbv_lernwelt/shop/models.py +++ b/server/vbv_lernwelt/shop/models.py @@ -78,11 +78,12 @@ class CheckoutState(models.TextChoices): class CheckoutInformation(models.Model): user = models.ForeignKey("core.User", on_delete=models.PROTECT) - # immutable product information at time of purchase product_sku = models.CharField(max_length=255) - product_price = models.IntegerField() # 10_00 = 10.00 CHF product_name = models.CharField(max_length=255) product_description = models.CharField(max_length=255) + product_price = models.IntegerField( + help_text="The total price of the product in centimes -> 1000 = 10.00 CHF" + ) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True)