# Generated by Django 5.2.14 on 2026-06-03 16:39

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Conversation",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "conversation_id",
                    models.CharField(db_index=True, max_length=64, unique=True),
                ),
                ("title", models.CharField(max_length=255)),
                (
                    "product_name",
                    models.CharField(blank=True, db_index=True, max_length=255),
                ),
                (
                    "batch_id",
                    models.CharField(blank=True, db_index=True, max_length=64),
                ),
                (
                    "task_status",
                    models.CharField(db_index=True, default="pending", max_length=32),
                ),
                ("node_results", models.JSONField(blank=True, default=list)),
                ("latest_summary", models.JSONField(blank=True, default=dict)),
                ("created_at", models.DateTimeField(auto_now_add=True, db_index=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                ("last_run_at", models.DateTimeField(blank=True, null=True)),
            ],
            options={
                "ordering": ["-updated_at", "-created_at"],
            },
        ),
    ]
