Aggiorna 'suitablephones/models.py'
This commit is contained in:
parent
22ed355e69
commit
f590a365c3
1 changed files with 19 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue