# Generated by Django 4.2.23 on 2025-07-20 12:29

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("indy_hub", "0015_migrate_to_charactersettings"),
    ]

    operations = [
        migrations.CreateModel(
            name="ProductionConfig",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("blueprint_type_id", models.BigIntegerField()),
                ("item_type_id", models.BigIntegerField()),
                (
                    "production_mode",
                    models.CharField(
                        choices=[
                            ("prod", "Produce"),
                            ("buy", "Buy"),
                            ("useless", "Useless"),
                        ],
                        default="prod",
                        max_length=10,
                    ),
                ),
                ("quantity_needed", models.BigIntegerField(default=0)),
                ("runs", models.IntegerField(default=1)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                (
                    "user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "default_permissions": (),
                "indexes": [
                    models.Index(
                        fields=["user", "blueprint_type_id", "runs"],
                        name="indy_hub_pr_user_id_1eec61_idx",
                    ),
                    models.Index(
                        fields=["user", "item_type_id"],
                        name="indy_hub_pr_user_id_e25480_idx",
                    ),
                ],
                "unique_together": {
                    ("user", "blueprint_type_id", "item_type_id", "runs")
                },
            },
        ),
    ]
