# Generated by Django 4.2.27 on 2026-03-01 20:51

# Django
import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("eve_sde", "0014_dogmaeffect_description_de_and_more"),
        ("indy_hub", "0086_materialexchangesellorder_anomaly_rejected_status"),
    ]

    operations = [
        migrations.CreateModel(
            name="SDEIndustryActivity",
            fields=[
                ("id", models.IntegerField(primary_key=True, serialize=False)),
                ("name", models.CharField(max_length=100)),
            ],
            options={
                "verbose_name": "SDE Industry Activity",
                "verbose_name_plural": "SDE Industry Activities",
                "db_table": "indy_hub_sdeindustryactivity",
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="SDEMarketGroup",
            fields=[
                ("id", models.BigIntegerField(primary_key=True, serialize=False)),
                ("name", models.CharField(max_length=255)),
                ("description", models.TextField(blank=True, null=True)),
                ("has_types", models.BooleanField(default=False)),
                ("icon_id", models.IntegerField(blank=True, null=True)),
                (
                    "parent_market_group",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="children",
                        to="indy_hub.sdemarketgroup",
                    ),
                ),
            ],
            options={
                "verbose_name": "SDE Market Group",
                "verbose_name_plural": "SDE Market Groups",
                "db_table": "indy_hub_sdemarketgroup",
                "default_permissions": (),
            },
        ),
        migrations.CreateModel(
            name="SDEBlueprintActivityProduct",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("quantity", models.IntegerField(default=1)),
                (
                    "activity",
                    models.ForeignKey(
                        db_column="activity_id",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="products",
                        to="indy_hub.sdeindustryactivity",
                    ),
                ),
                (
                    "eve_type",
                    models.ForeignKey(
                        db_column="eve_type_id",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="eve_sde.itemtype",
                    ),
                ),
                (
                    "product_eve_type",
                    models.ForeignKey(
                        db_column="product_eve_type_id",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="eve_sde.itemtype",
                    ),
                ),
            ],
            options={
                "verbose_name": "SDE Blueprint Activity Product",
                "verbose_name_plural": "SDE Blueprint Activity Products",
                "db_table": "indy_hub_sdeindustryactivityproduct",
                "default_permissions": (),
                "indexes": [
                    models.Index(
                        fields=["eve_type", "activity"],
                        name="indy_hub_sd_eve_typ_7f8049_idx",
                    ),
                    models.Index(
                        fields=["product_eve_type", "activity"],
                        name="indy_hub_sd_product_da15e2_idx",
                    ),
                ],
                "unique_together": {("eve_type", "activity", "product_eve_type")},
            },
        ),
        migrations.CreateModel(
            name="SDEBlueprintActivityMaterial",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("quantity", models.IntegerField(default=0)),
                (
                    "activity",
                    models.ForeignKey(
                        db_column="activity_id",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="materials",
                        to="indy_hub.sdeindustryactivity",
                    ),
                ),
                (
                    "eve_type",
                    models.ForeignKey(
                        db_column="eve_type_id",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="eve_sde.itemtype",
                    ),
                ),
                (
                    "material_eve_type",
                    models.ForeignKey(
                        db_column="material_eve_type_id",
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="+",
                        to="eve_sde.itemtype",
                    ),
                ),
            ],
            options={
                "verbose_name": "SDE Blueprint Activity Material",
                "verbose_name_plural": "SDE Blueprint Activity Materials",
                "db_table": "indy_hub_sdeindustryactivitymaterial",
                "default_permissions": (),
                "indexes": [
                    models.Index(
                        fields=["eve_type", "activity"],
                        name="indy_hub_sd_eve_typ_0139d2_idx",
                    ),
                    models.Index(
                        fields=["material_eve_type", "activity"],
                        name="indy_hub_sd_materia_b42c80_idx",
                    ),
                ],
                "unique_together": {("eve_type", "activity", "material_eve_type")},
            },
        ),
    ]
