From 1e8f05304ae593d0c9a54ea1ad860335239a2c3e Mon Sep 17 00:00:00 2001 From: d0c Date: Fri, 20 Jan 2023 16:45:23 +0100 Subject: [PATCH] model upgrade --- suitablephones/models.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/suitablephones/models.py b/suitablephones/models.py index d2218b7..1e81188 100644 --- a/suitablephones/models.py +++ b/suitablephones/models.py @@ -23,40 +23,44 @@ class Camera(models.Model): class Device(models.Model): + architecture = models.JSONField(default=dict) battery = models.JSONField(default=dict) - architecture = models.CharField(max_length=100) - before_install = models.JSONField(default=dict) # dict or str + before_install = models.JSONField(default=dict, null=True) # dict or str bluetooth = models.ForeignKey(Bluetooth, on_delete=models.CASCADE) cameras = models.ManyToManyField(Camera) - cpu = models.CharField(max_length=100) codename = models.CharField(max_length=100) - cpu_cores = models.CharField(max_length=100) + cpu = models.CharField(max_length=100) + cpu_cores = models.IntegerField(default=1) cpu_freq = models.CharField(max_length=100) current_branch = models.FloatField(default=None) - download_boot = models.CharField(max_length=100) - dimensions = models.CharField(max_length=100) + custom_recovery_link = models.URLField(max_length=200, null=True) + download_boot = models.CharField(max_length=200) + dimensions = models.JSONField(default=dict, null=True) gpu = models.CharField(max_length=100) image = models.CharField(max_length=100) install_method = models.CharField(max_length=100) + is_ab_device = models.BooleanField(null=True) kernel = models.CharField(max_length=100) maintainers = ArrayField(models.CharField(max_length=100), default=None) device_models = ArrayField(models.CharField(max_length=100), default=None) - peripherals = ArrayField(models.CharField(max_length=100), default=None) name = models.CharField(max_length=100) - recovery_boot = models.CharField(max_length=100) + network = ArrayField(models.CharField(max_length=100), default=None) + peripherals = ArrayField(models.CharField(max_length=100), default=None) ram = models.CharField(max_length=100) + recovery_boot = models.CharField(max_length=100) recovery_reboot = models.CharField(max_length=100) - release = models.CharField(max_length=100) + release = models.DateField() screen = models.JSONField(default=dict) # dict or str sdcard = models.JSONField(default=dict) # dict or str{1} - storage = models.CharField(max_length=100) soc = models.CharField(max_length=100) + storage = models.CharField(max_length=100) tree = models.CharField(max_length=100) device_type = models.CharField(max_length=100) + uses_twrp = models.BooleanField(null=True) vendor = models.CharField(max_length=100) vendor_short = models.CharField(max_length=100) versions = ArrayField(models.FloatField(default=None), default=None) - wifi = models.CharField(max_length=100) + wifi = models.CharField(max_length=200, null=True) def __str__(self): return 'Device: ' + self.name \ No newline at end of file