some changes to models.py got lost somehow
This commit is contained in:
parent
8644d4ba2f
commit
1b27145ecb
|
@ -403,8 +403,9 @@ class Invoice(CreatedUpdatedModel):
|
|||
|
||||
|
||||
class CoinifyAPIInvoice(CreatedUpdatedModel):
|
||||
coinify_id = models.IntegerField(null=True)
|
||||
invoicejson = JSONField()
|
||||
order = models.OneToOneField('shop.Order')
|
||||
order = models.ForeignKey('shop.Order', related_name="coinify_api_invoices", on_delete=models.PROTECT)
|
||||
|
||||
def __str__(self):
|
||||
return "coinifyinvoice for order #%s" % self.order.id
|
||||
|
@ -418,13 +419,23 @@ class CoinifyAPICallback(CreatedUpdatedModel):
|
|||
headers = JSONField()
|
||||
payload = JSONField(blank=True)
|
||||
body = models.TextField(default='')
|
||||
order = models.ForeignKey('shop.Order')
|
||||
valid = models.BooleanField(default=False)
|
||||
order = models.ForeignKey('shop.Order', related_name="coinify_api_callbacks", on_delete=models.PROTECT)
|
||||
authenticated = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
return 'order #%s callback at %s' % (self.order.id, self.created)
|
||||
|
||||
|
||||
class CoinifyAPIRequest(CreatedUpdatedModel):
|
||||
order = models.ForeignKey('shop.Order', related_name="coinify_api_requests", on_delete=models.PROTECT)
|
||||
method = models.CharField(max_length=100)
|
||||
payload = JSONField()
|
||||
response = models.TextField()
|
||||
|
||||
def __str__(self):
|
||||
return 'order %s api request %s' % (self.order.id, self.method)
|
||||
|
||||
|
||||
class Ticket(CreatedUpdatedModel, UUIDModel):
|
||||
order = models.ForeignKey('shop.Order', related_name='tickets')
|
||||
product = models.ForeignKey('shop.Product', related_name='tickets')
|
||||
|
|
Loading…
Reference in a new issue