This commit is contained in:
2026-04-04 01:16:16 +03:30
parent ecb42c6895
commit 6d5ece1f5d
22 changed files with 311 additions and 261 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ from django.db import models
class SensorCatalog(models.Model):
uuid = models.UUIDField(default=uuid.uuid4, unique=True, editable=False, db_index=True)
code = models.CharField(max_length=255, unique=True, db_index=True)
name = models.CharField(max_length=255, unique=True, db_index=True)
description = models.TextField(blank=True, default="")
customizable_fields = models.JSONField(default=list, blank=True)
@@ -17,7 +18,7 @@ class SensorCatalog(models.Model):
class Meta:
db_table = "sensor_catalogs"
ordering = ["name"]
ordering = ["code"]
def __str__(self):
return self.name