Parse Drakdoo response into model fields

This commit is contained in:
2022-10-15 23:28:46 +01:00
parent 20a4e21eaa
commit bc27748396
4 changed files with 35 additions and 12 deletions

View File

@@ -83,7 +83,16 @@ class Hook(models.Model):
class Callback(models.Model):
hook = models.ForeignKey(Hook, on_delete=models.CASCADE)
data = models.JSONField()
title = models.CharField(max_length=1024, null=True, blank=True)
message = models.CharField(max_length=1024, null=True, blank=True)
period = models.CharField(max_length=255, null=True, blank=True)
market = models.CharField(max_length=255, null=True, blank=True)
timestamp_sent = models.DateTimeField(null=True, blank=True)
timestamp_trade = models.DateTimeField(null=True, blank=True)
market_exchange = models.CharField(max_length=255, null=True, blank=True)
market_item = models.CharField(max_length=255, null=True, blank=True)
market_currency = models.CharField(max_length=255, null=True, blank=True)
market_contract = models.CharField(max_length=255, null=True, blank=True)
# class Perms(models.Model):