chore: add price help text

This commit is contained in:
Livio Bieri 2023-11-17 14:54:20 +01:00 committed by Christian Cueni
parent f8ae88ac1a
commit 083af9e308
2 changed files with 21 additions and 2 deletions

View File

@ -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'),
),
]

View File

@ -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)