# Generated by Django 5.2.15 on 2026-06-16 20:09

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


class Migration(migrations.Migration):

    dependencies = [
        ("eveonline", "0025_remove_evecharacter_last_updated_and_more"),
        ("eveuniverse", "0012_alter_evebloodline_eve_ship_type"),
        (
            "industry_reforged",
            "0002_alter_general_options_characterindustryjob_and_more",
        ),
    ]

    operations = [
        migrations.CreateModel(
            name="CharacterPlanet",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("planet_id", models.IntegerField()),
                ("system_id", models.IntegerField()),
                ("upgrade_level", models.IntegerField(default=0)),
                ("num_pins", models.IntegerField(default=0)),
                ("last_update", models.DateTimeField(auto_now=True)),
                (
                    "character",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="planets",
                        to="eveonline.evecharacter",
                    ),
                ),
                (
                    "planet_type",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to="eveuniverse.evetype",
                    ),
                ),
            ],
            options={
                "verbose_name": "Character Planet",
                "verbose_name_plural": "Character Planets",
                "unique_together": {("character", "planet_id")},
            },
        ),
        migrations.CreateModel(
            name="PlanetPin",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("pin_id", models.BigIntegerField()),
                ("expiry_time", models.DateTimeField(blank=True, null=True)),
                ("cycle_time", models.IntegerField(blank=True, null=True)),
                ("extraction_yield", models.FloatField(blank=True, null=True)),
                ("schematic_id", models.IntegerField(blank=True, null=True)),
                ("last_cycle_start", models.DateTimeField(blank=True, null=True)),
                (
                    "planet",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="pins",
                        to="industry_reforged.characterplanet",
                    ),
                ),
                (
                    "product_type",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to="eveuniverse.evetype",
                    ),
                ),
                (
                    "type",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        related_name="+",
                        to="eveuniverse.evetype",
                    ),
                ),
            ],
            options={
                "verbose_name": "Planet Pin",
                "verbose_name_plural": "Planet Pins",
                "unique_together": {("planet", "pin_id")},
            },
        ),
    ]
