added version field

This commit is contained in:
d0c 2023-01-16 17:47:07 +01:00
parent c1428592d8
commit 8054a37c0d

View file

@ -1,3 +1,4 @@
from django.contrib.postgres.fields import ArrayField
from django.db import models from django.db import models
# Create your models here. # Create your models here.
@ -22,8 +23,6 @@ class Camera(models.Model):
def __str__(self): def __str__(self):
return f"Camera: {self.megapixel} - {self.flash}" return f"Camera: {self.megapixel} - {self.flash}"
#Devices.object.filter(flash=Camera.FLASEHS.LED)
class Device(models.Model): class Device(models.Model):
#battery = <class 'dict'> #battery = <class 'dict'>
@ -58,7 +57,7 @@ class Device(models.Model):
type = models.CharField(max_length=100) type = models.CharField(max_length=100)
vendor = models.CharField(max_length=100) vendor = models.CharField(max_length=100)
vendor_short = models.CharField(max_length=100) vendor_short = models.CharField(max_length=100)
#versions = <class 'list'> versions = ArrayField(models.FloatField())
wifi = models.CharField(max_length=100) wifi = models.CharField(max_length=100)
def __str__(self): def __str__(self):