Added GTIN product storage and remote service integration

This commit is contained in:
2022-04-13 15:42:09 +02:00
parent f1dab1c0a1
commit 4da41fe1cd
8 changed files with 117 additions and 6 deletions

View File

@@ -23,3 +23,13 @@ class Asset(models.Model):
def get_absolute_url(self):
return reverse('asset:detail', kwargs={'pk': self.pk})
class GtinProduct(models.Model):
gtin = models.CharField(max_length=40, unique=True)
api_request = models.CharField(max_length=250)
api_response = models.CharField(max_length=4096)
name = models.CharField(max_length=200, blank=True)
brand = models.CharField(max_length=40, blank=True)
created_ts = models.DateTimeField('datetime created', auto_now_add=True)
changed_ts = models.DateTimeField('datetime updated', auto_now=True)