models.py 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. from django.db import models
  2. # Create your models here.
  3. class Bluetooth(models.Model):
  4. spec = models.CharField(max_length=100)
  5. profile = models.CharField(max_length=100)
  6. class Camera(models.Model):
  7. class FLASHES(models.TextChoices):
  8. LED = 'L', 'Led'
  9. DUAL_LED = 'DL', 'Double Led'
  10. megapixel = models.DecimalField(max_digits=5, decimal_places=1)
  11. flash = models.CharField(max_length=100, choices=FLASHES.choices)
  12. #Devices.object.filter(flash=Camera.FLASEHS.LED)
  13. class Device(models.Model):
  14. #battery = <class 'dict'>
  15. architecture = models.CharField(max_length=100)
  16. #before_install = <class 'dict'>
  17. bluetooth = models.ForeignKey(Bluetooth, on_delete=models.CASCADE)
  18. cameras = models.ManyToManyField(Camera)
  19. cpu = models.CharField(max_length=100)
  20. codename = models.CharField(max_length=100)
  21. cpu_cores = models.CharField(max_length=100)
  22. cpu_freq = models.CharField(max_length=100)
  23. #current_branch = <class 'float'>
  24. download_boot = models.CharField(max_length=100)
  25. dimensions = models.CharField(max_length=100)
  26. gpu = models.CharField(max_length=100)
  27. image = models.CharField(max_length=100)
  28. install_method = models.CharField(max_length=100)
  29. kernel = models.CharField(max_length=100)
  30. #maintainers = <class 'list'>
  31. #models = <class 'list'>
  32. #peripherals = <class 'list'>
  33. name = models.CharField(max_length=100)
  34. recovery_boot = models.CharField(max_length=100)
  35. ram = models.CharField(max_length=100)
  36. recovery_reboot = models.CharField(max_length=100)
  37. release = models.CharField(max_length=100)
  38. #screen = <class 'dict'>
  39. #sdcard = <class 'dict'>
  40. storage = models.CharField(max_length=100)
  41. soc = models.CharField(max_length=100)
  42. tree = models.CharField(max_length=100)
  43. type = models.CharField(max_length=100)
  44. vendor = models.CharField(max_length=100)
  45. vendor_short = models.CharField(max_length=100)
  46. #versions = <class 'list'>
  47. wifi = models.CharField(max_length=100)