# Generated by Django 5.2.10 on 2026-01-31 19:09

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name="Discovery",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("is_seed_data", models.BooleanField(default=False, editable=False)),
                ("is_user_data", models.BooleanField(default=False, editable=False)),
                ("is_deleted", models.BooleanField(default=False, editable=False)),
                ("action_label", models.CharField(max_length=200)),
                ("app_label", models.CharField(max_length=100)),
                ("model_name", models.CharField(blank=True, max_length=100)),
                ("metadata", models.JSONField(blank=True, null=True)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "initiated_by",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="discoveries",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "verbose_name": "Discovery",
                "verbose_name_plural": "Discoveries",
                "ordering": ["-created_at"],
            },
        ),
        migrations.CreateModel(
            name="DiscoveryItem",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("is_seed_data", models.BooleanField(default=False, editable=False)),
                ("is_user_data", models.BooleanField(default=False, editable=False)),
                ("is_deleted", models.BooleanField(default=False, editable=False)),
                ("object_id", models.CharField(blank=True, max_length=64)),
                ("label", models.CharField(blank=True, max_length=255)),
                ("was_created", models.BooleanField(default=False)),
                ("was_overwritten", models.BooleanField(default=False)),
                ("data", models.JSONField(blank=True, null=True)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "content_type",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="discovery_items",
                        to="contenttypes.contenttype",
                    ),
                ),
                (
                    "discovery",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="items",
                        to="discovery.discovery",
                    ),
                ),
            ],
            options={
                "verbose_name": "Discovery Item",
                "verbose_name_plural": "Discovery Items",
                "ordering": ["-created_at"],
            },
        ),
    ]
