# Generated by ChatGPT on 2026-02-07

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


class Migration(migrations.Migration):
    dependencies = [
        ("indy_hub", "0079_material_exchange_settings"),
    ]

    operations = [
        migrations.CreateModel(
            name="IndustrySkillSnapshot",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("character_id", models.BigIntegerField(unique=True)),
                ("mass_production_level", models.PositiveSmallIntegerField(default=0)),
                (
                    "advanced_mass_production_level",
                    models.PositiveSmallIntegerField(default=0),
                ),
                (
                    "laboratory_operation_level",
                    models.PositiveSmallIntegerField(default=0),
                ),
                (
                    "advanced_laboratory_operation_level",
                    models.PositiveSmallIntegerField(default=0),
                ),
                ("mass_reactions_level", models.PositiveSmallIntegerField(default=0)),
                (
                    "advanced_mass_reactions_level",
                    models.PositiveSmallIntegerField(default=0),
                ),
                (
                    "trained_mass_production_level",
                    models.PositiveSmallIntegerField(default=0),
                ),
                (
                    "trained_advanced_mass_production_level",
                    models.PositiveSmallIntegerField(default=0),
                ),
                (
                    "trained_laboratory_operation_level",
                    models.PositiveSmallIntegerField(default=0),
                ),
                (
                    "trained_advanced_laboratory_operation_level",
                    models.PositiveSmallIntegerField(default=0),
                ),
                (
                    "trained_mass_reactions_level",
                    models.PositiveSmallIntegerField(default=0),
                ),
                (
                    "trained_advanced_mass_reactions_level",
                    models.PositiveSmallIntegerField(default=0),
                ),
                ("last_updated", models.DateTimeField(auto_now=True)),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "owner_user",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="industry_skill_snapshots",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
            options={
                "verbose_name": "Industry Skill Snapshot",
                "verbose_name_plural": "Industry Skill Snapshots",
                "default_permissions": (),
            },
        ),
        migrations.AddIndex(
            model_name="industryskillsnapshot",
            index=models.Index(
                fields=["owner_user", "character_id"],
                name="indy_hub_skill_user_char_idx",
            ),
        ),
    ]
