Connect giftcards with customer accounts (#5126)

Connect giftcards with customer accounts, show giftcards during checkout and in account , show giftcard list in backend customer view
This commit is contained in:
Phin Wolkwitz
2025-10-16 13:20:00 +02:00
committed by GitHub
parent 71f2c8093f
commit 8a3da37b45
22 changed files with 490 additions and 6 deletions

View File

@@ -80,6 +80,13 @@ class GiftCard(LoggedModel):
null=True, blank=True,
verbose_name=_('Owned by ticket holder')
)
customer = models.ForeignKey(
'Customer',
related_name='customer_gift_cards',
on_delete=models.PROTECT,
null=True, blank=True,
verbose_name=_('Owned by customer account')
)
issuance = models.DateTimeField(
auto_now_add=True,
)