import uuid

from django.db import migrations, models


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="ImageSession",
            fields=[
                ("id", models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ("original_image", models.CharField(max_length=255)),
                ("processed_image", models.CharField(blank=True, max_length=255)),
                ("width", models.PositiveIntegerField()),
                ("height", models.PositiveIntegerField()),
                ("channels", models.PositiveSmallIntegerField()),
                ("color_mode", models.CharField(max_length=16)),
                ("original_histogram", models.JSONField(default=list)),
                ("processed_histogram", models.JSONField(blank=True, default=list)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("expires_at", models.DateTimeField()),
            ],
        ),
        migrations.CreateModel(
            name="ProcessingJob",
            fields=[
                ("id", models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ("operation", models.CharField(max_length=64)),
                ("params", models.JSONField(blank=True, default=dict)),
                ("status", models.CharField(choices=[("pending", "Pending"), ("running", "Running"), ("complete", "Complete"), ("failed", "Failed")], default="pending", max_length=16)),
                ("progress", models.PositiveSmallIntegerField(default=0)),
                ("result_image", models.CharField(blank=True, max_length=255)),
                ("result_histogram", models.JSONField(blank=True, default=list)),
                ("error", models.TextField(blank=True)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
            ],
        ),
    ]
