feat(v2): add multiple extra features from the pdf slides

This commit is contained in:
2026-07-09 01:22:02 +03:30
parent ae240e7ac1
commit 20a43d5c9a
16 changed files with 1003 additions and 239 deletions

View File

@@ -28,6 +28,26 @@ class ImageSession(models.Model):
return timezone.now() >= self.expires_at
class ImageState(models.Model):
id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
session = models.ForeignKey(ImageSession, related_name="states", on_delete=models.CASCADE)
parent = models.ForeignKey("self", related_name="children", on_delete=models.SET_NULL, null=True, blank=True)
sequence = models.PositiveIntegerField(default=0)
label = models.CharField(max_length=120)
operation = models.CharField(max_length=96)
params = models.JSONField(default=dict, blank=True)
image = models.CharField(max_length=255)
width = models.PositiveIntegerField()
height = models.PositiveIntegerField()
channels = models.PositiveSmallIntegerField()
color_mode = models.CharField(max_length=16)
histogram = models.JSONField(default=dict)
created_at = models.DateTimeField(auto_now_add=True)
class Meta:
ordering = ["sequence", "created_at"]
class ProcessingJob(models.Model):
STATUS_PENDING = "pending"
STATUS_RUNNING = "running"