Aggiorna 'suitablephones/models.py'

This commit is contained in:
parruc 2023-01-03 11:02:23 +01:00
parent 22ed355e69
commit f590a365c3

View file

@ -2,12 +2,29 @@ from django.db import models
# Create your models here.
class Bluetooth(models.Model):
spec = models.CharField(max_lengh=100)
profile = models.CharField(max_lengh=100)
class Camera(models.Model):
class FLASHES(models.TextChoices:
LED = 'L', 'Led'
DUAL_LED = 'DL', 'Double Led'
megapixel = models.DecimalField()
flash = models.CharField(max_lengh=100, choices=FLASH)
#Devices.object.filter(flash=Camera.FLASEHS.LED)
class Device(models.Model):
#battery = <class 'dict'>
architecture = models.CharField(max_length=100)
#before_install = <class 'dict'>
#bluetooth = <class 'dict'>
#cameras = <class 'list'>
bluetooth = modle.ForeingKey(Bluetooth)
cameras = models.ManyToManyField(Camera)
cpu = models.CharField(max_length=100)
codename = models.CharField(max_length=100)
cpu_cores = models.CharField(max_length=100)